|
[Sponsors] |
externalCoupledTemperature for incompressible? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 30, 2020, 14:07 |
externalCoupledTemperature for incompressible?
|
#1 |
Member
sibo
Join Date: Oct 2016
Location: Chicago
Posts: 55
Rep Power: 10 |
Hi Foamers,
There is an boundary condition called externalCoupledTemperature which is used to couple OF solves to other CFD codes. However, it can only be used in compressible solver for now. The reason can be found in the following code. Basically, this BC needs 'he' and 'alpha', which can only be accessed in thermo class in compressible solvers. Since the incompressible solvers solve temperature separately from P/U, it only has this transport class. Code:
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); }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); } Any suggestion is welcome. Thanks in advance! |
|
October 3, 2020, 11:32 |
|
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
Did you try to use a compressible solver but choosing a constant density and in the thermodynamic package. See https://cfd.direct/openfoam/user-gui...hermophysical/
|
|
Tags |
externalcoupled, incompressible, thermo |
|
|