Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. externalCoupledTemperature 怎么用在不可压缩solver中?

externalCoupledTemperature 怎么用在不可压缩solver中?

已定时 已固定 已锁定 已移动 OpenFOAM
4 帖子 3 发布者 3.4k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • siboS 离线
    siboS 离线
    sibo
    写于 最后由 编辑
    #1

    大家好,

    最近在用externalCoupledTemperature 边界条件,这个是用来把OpenFOAM solver和其他cfd联系起来。但是目前这个BC只能用在compressible solver里面,原因可见下面的code. 基本上就是,它需要‘he'和’alpha‘,但这些传热量只能在thermo库里找到。因为incomopressible solver是分开求解温度的,只有transport库,所以会报错。

    if (db().foundObject<cmpTurbModelType>(turbName))
        {
            const cmpTurbModelType& turbModel =
                db().lookupObject<cmpTurbModelType>(turbName);
    
            const basicThermo& thermo = turbModel.transport();
    
            const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi];
    
            qDot = turbModel.alphaEff(patchi)*hep.snGrad();
        }
        else if (db().foundObject<basicThermo>(thermoName))
        {
            const basicThermo& thermo = db().lookupObject<basicThermo>(thermoName);
    
            const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi];
    
            qDot = thermo.alpha().boundaryField()[patchi]*hep.snGrad();
        }
        else
        {
            FatalErrorInFunction
                << "Condition requires either compressible turbulence and/or "
                << "thermo model to be available" << exit(FatalError);
        }
    

    现在想修改一下这个BC, 让它可以在incompressible solver中也得到’he', 'alpha', 还请大家给点建议!十分感谢!

    1 条回复 最后回复
  • bestucanB 离线
    bestucanB 离线
    bestucan 版主 大神
    写于 最后由 编辑
    #2

    给 incompressible 求解温度部分的代码加个 thermo 的壳(定义一套 thermo 的变量,但没有 thermo 的计算过程,变量的更新由 incompressible solver 完成后赋给它),让其他代码误以为incompressible solver 里有 thermo。如果无法实现,那要改的就太多了。

    :xiezuoye:

    滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

    异步沟通方式(《posting style》from wiki)(下载后打开):
    https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
    提问的智慧(github在gitee的镜像):
    https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way

    siboS 1 条回复 最后回复
  • siboS 离线
    siboS 离线
    sibo
    在 中回复了 bestucan 最后由 编辑
    #3

    @bestucan 感谢回复!加thermo在incomprehensible里面,理论上可以。不过今天试了一下,报错挺多好多需要改。。。并且主要是我们想做一个普适性的BC, 因为会用到多个不可压缩solvers,每个都改太麻烦了。所以还是想从改bc上入手。

    1 条回复 最后回复
  • C 离线
    C 离线
    Cr
    写于 最后由 编辑
    #4

    或许可以将代码改为用不可压缩求解器求解的边界上的温度和导热率来获得,边界上的传热量。例如:

    if(db().foundObject<volScalarField>("T"))
    {
        const volScalarField& T = db().lookupObject<volScalarField>("T");
        const fvPatchScalarField& Tp = T.boundaryField()[patchi];
        qDot = kappa*Tp.snGrad();
    }
    

    其中kappa需要根据你的物性和边界上的温度场来计算获得

    1 条回复 最后回复

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]