CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

How to implement this convective source term !!

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   December 20, 2021, 21:51
Question How to implement this convective source term !!
Senior Member
Join Date: Oct 2016
Posts: 317
Rep Power: 8
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Hello Foamers,
I have the following energy equation used to build the 1D numerical model in OpenFOAM.
{\rho c\frac{\delta T}{\delta t}=\frac{\delta}{\delta x}\left ( K\frac{\delta T}{\delta x} \right )+Q\
+ r_{gas}C_{p_{gas}}\frac{\delta T}{\delta x}}
The source term r_{gas}C_{p_{gas}}\frac{\delta T}{\delta x} put me in tough spot.

where r_{gas}= mass flow of the gas resulting in convective heat transfer in the charge (kg/m2.s) and C_{p_{gas}}= 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

It will happen, only if r_{gas} is surfaceScalarField. When I try to fix this and run in OpenFOAM, an expected error pops up due to incompatible dimensions as,
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 r_{gas} fixing as surfaceScalarField, r_{gas} 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 !
Kummi is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 16:18
[] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 18:13
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error FerdiFuchs OpenFOAM Community Contributions 27 April 16, 2014 15:14
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 05:18

All times are GMT -4. The time now is 14:08.