Skip to content
  • 最新
  • Categories
  • 东岳流体
  • 随机看[请狂点我]
Skins
  • 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

  • Default (No Skin)
  • No Skin
Collapse
CFD中文网

CFD中文网

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

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

Scheduled Pinned Locked Moved OpenFOAM
4 Posts 3 Posters 3.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • siboS Offline
    siboS Offline
    sibo
    wrote on last edited by
    #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 Reply Last reply
  • bestucanB Offline
    bestucanB Offline
    bestucan 版主 大神
    wrote on last edited by
    #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 Reply Last reply
  • siboS Offline
    siboS Offline
    sibo
    replied to bestucan on last edited by
    #3

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

    1 Reply Last reply
  • C Offline
    C Offline
    Cr
    wrote on last edited by
    #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 Reply Last reply

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • 最新
  • Categories
  • 东岳流体
  • 随机看[请狂点我]