CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Turbulent Heat Transfer Incompressible using pisoFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 14, 2025, 10:22
Exclamation Turbulent Heat Transfer Incompressible using pisoFoam
  #1
New Member
 
Shruti Aaher
Join Date: Jan 2025
Posts: 3
Rep Power: 2
kishee is on a distinguished road
Hello everyone,

I’m currently working on modeling turbulence with heat transfer in a 2D combustion chamber plate (up to the throat) using a modified version of the pisoFoam solver. Since I’m simulating incompressible flow, I’m focusing on incorporating heat transfer (HT) aspects into my solver.

However, I’m encountering the following issues:

Errors related to initializing the thermophysical model using heRhoThermo with basicThermo and pureMixture.
Difficulty in properly defining and initializing a transport model for turbulent heat transfer.
I’m unsure how to cohesively set up the transport properties, like Pr, Prt, and kappaT, to handle the HT aspect while maintaining consistency with the turbulence model.
I’ve reviewed the existing models and included necessary headers (e.g., pureMixture.H, heRhoThermo.H), but the solver still fails to compile due to template argument and scope errors.

Any guidance on how to proceed with initializing the HT transport model or resolving the errors would be greatly appreciated!

Thank you in advance!

The Error is as following:
kisheenux@kishee:~/OpenFOAM/kisheenux-10/run/project/myPisoFoam$ wclean
kisheenux@kishee:~/OpenFOAM/kisheenux-10/run/project/myPisoFoam$ wmake
Making dependency list for source file myPisoFoam.C
g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam10/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/opt/openfoam10/src/MomentumTransportModels/incompressible/lnInclude -I/opt/openfoam10/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam10/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam10/src/physicalProperties/lnInclude -I/opt/openfoam10/src/finiteVolume/lnInclude -I/opt/openfoam10/src/meshTools/lnInclude -I/opt/openfoam10/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam10/src/OpenFOAM/lnInclude -I/opt/openfoam10/src/OSspecific/POSIX/lnInclude -fPIC -c myPisoFoam.C -o Make/linux64GccDPInt32Opt/myPisoFoam.o
In file included from /opt/openfoam10/src/OpenFOAM/lnInclude/postProcess.H:106,
from myPisoFoam.C:51:
./createFields.H: In function ‘int main(int, char**)’:
./createFields.H:128:34: error: type/value mismatch at argument 2 in template parameter list for ‘template<class BasicRhoThermo, class MixtureType> class Foam::heRhoThermo’
128 | autoPtr<heRhoThermo<basicThermo, pureMixture>> thermo
| ^~~~~~~~~~~
./createFields.H:128:34: note: expected a type, got ‘pureMixture’
./createFields.H:128:45: error: template argument 1 is invalid
128 | autoPtr<heRhoThermo<basicThermo, pureMixture>> thermo
| ^~
./createFields.H:130:41: error: type/value mismatch at argument 2 in template parameter list for ‘template<class BasicRhoThermo, class MixtureType> class Foam::heRhoThermo’
130 | heRhoThermo<basicThermo, pureMixture>::New(mesh)
| ^
./createFields.H:130:41: note: expected a type, got ‘pureMixture’
./createFields.H:130:47: error: expected ‘,’ or ‘...’ before ‘(’ token
130 | heRhoThermo<basicThermo, pureMixture>::New(mesh)
| ^
./createFields.H:133:44: error: request for member ‘type’ in ‘* thermo’, which is of non-class type ‘int(int)’
133 | Info<< "Thermophysical model: " << thermo->type() << endl;
| ^~~~
In file included from myPisoFoam.C:57:
createFields.H:128:34: error: type/value mismatch at argument 2 in template parameter list for ‘template<class BasicRhoThermo, class MixtureType> class Foam::heRhoThermo’
128 | autoPtr<heRhoThermo<basicThermo, pureMixture>> thermo
| ^~~~~~~~~~~
createFields.H:128:34: note: expected a type, got ‘pureMixture’
createFields.H:128:45: error: template argument 1 is invalid
128 | autoPtr<heRhoThermo<basicThermo, pureMixture>> thermo
| ^~
createFields.H:130:41: error: type/value mismatch at argument 2 in template parameter list for ‘template<class BasicRhoThermo, class MixtureType> class Foam::heRhoThermo’
130 | heRhoThermo<basicThermo, pureMixture>::New(mesh)
| ^
createFields.H:130:41: note: expected a type, got ‘pureMixture’
createFields.H:130:47: error: expected ‘,’ or ‘...’ before ‘(’ token
130 | heRhoThermo<basicThermo, pureMixture>::New(mesh)
| ^
createFields.H:133:44: error: request for member ‘type’ in ‘* thermo’, which is of non-class type ‘int(int)’
133 | Info<< "Thermophysical model: " << thermo->type() << endl;
| ^~~~
make: *** [/opt/openfoam10/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/myPisoFoam.o] Error 1
kisheenux@kishee:~/OpenFOAM/kisheenux-10/run/project/myPisoFoam$



I will attach the TEqn, createFields and myPisoFoam files. UEqn and pEqn remain unchanged. Pleaseeeeeeeeeeeeee Helpppppppp Meeeeeeeee
kishee is offline   Reply With Quote

Old   January 14, 2025, 13:07
Post
  #2
New Member
 
Shruti Aaher
Join Date: Jan 2025
Posts: 3
Rep Power: 2
kishee is on a distinguished road
Here are the files.
Attached Files
File Type: h createFields.H (2.9 KB, 0 views)
File Type: c myPisoFoam.C (3.1 KB, 0 views)
File Type: h TEqn.H (316 Bytes, 1 views)
kishee is offline   Reply With Quote

Old   January 18, 2025, 10:37
Default This is how I solved it
  #3
New Member
 
Shruti Aaher
Join Date: Jan 2025
Posts: 3
Rep Power: 2
kishee is on a distinguished road
Hey! so I couldn't figure out how to use a thermo/thermophysical model so I hardcoded it into solver files! I attached the files below for reference. I would like to read if anyone has any other opinion or method of doing this. Thanks in advance!!
Attached Files
File Type: h createFields.H (3.2 KB, 0 views)
File Type: h TEqn.H (933 Bytes, 1 views)
File Type: c myPisoFoam.C (2.9 KB, 1 views)
kishee is offline   Reply With Quote

Old   January 18, 2025, 12:43
Default
  #4
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 867
Rep Power: 19
Tobermory will become famous soon enough
"Incompressible flow with heat transfer" ... I am not quite sure what you mean by this.

Do you mean:
- density is totally decoupled from temperature variations, i.e. temperature acts as a passive scalar (if so, then just use pisoFoam with scalarTransport; but I don't think that's what you mean)
- density variations are small, \delta\rho/\rho << 1, i.e. weakly compressible, i.e. Boussinesq conditions - why not use the Bossuinesq heat transfer solver instead of pisoFoam?
- density variations are non-trivial, \delta\rho/\rho > 0.1, but flow is low Mach number (Ma<0.3) - why not just use one of the existing heat transfer solvers?
Tobermory is offline   Reply With Quote

Reply

Tags
heat transfer, incompressible, pisofoam, turbulent diffusion term

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
Problem with total heat transfer rate aswathy_raghu FLUENT 0 July 26, 2016 08:39
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
Question about heat transfer simulation Anna Tian Main CFD Forum 0 January 25, 2013 19:53
Heat Transfer mechanisms tafaugl CFX 1 November 7, 2012 19:46
Turbulent Heat Transfer Transport Equation Flo.duck Main CFD Forum 0 May 6, 2009 04:37


All times are GMT -4. The time now is 03:12.