December 20, 2021, 21:51
|
How to implement this convective source term !!
|
#1
|
Senior Member
Kumaresh
Join Date: Oct 2016
Posts: 317
Rep Power: 8
|
Hello Foamers,
I have the following energy equation used to build the 1D numerical model in OpenFOAM. The source term  put me in tough spot.
where  = mass flow of the gas resulting in convective heat transfer in the charge (kg/m2.s) and  = specific heat of the gas (J/kg.K).
I have implemented it in the following way. If the source term implies convection, then divergence play a role
fvm::div(( , ),T_)
It will happen, only if  is surfaceScalarField. When I try to fix this and run in OpenFOAM, an expected error pops up due to incompatible dimensions as,
Quote:
--> FOAM FATAL ERROR:
incompatible dimensions for operation
[T[1 -3 -3 0 0 0 0] ] + [(chemistrySh)[1 -1 -3 0 0 0 0] ]
From function checkMethod(const fvMatrix<Type>&, const GeometricField<Type, fvPatchField, volMesh>&)
in file lnInclude/fvMatrix.C at line 1340.
FOAM aborting
|
Because when fixing as surfaceScalarField, dimension gets reduced from (kg/m2.s) to (kg/s)
Am I right in executing this source term ?
How to resolve this source term ? Kindly someone share the ideas please. Thank you !
|
|
|