CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

adding thermophysical model to conjugateHeatFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 1, 2011, 13:12
Default adding thermophysical model to conjugateHeatFoam
  #1
New Member
 
Helmut Roth
Join Date: Mar 2009
Posts: 23
Rep Power: 8
helmut is on a distinguished road
Hello,
I want to add a thermophysical model to the fluid side of conjugateHeatFoam. Itís not going well!
To get started, I used rhoPisoFoam as a model to rewrite solveFluid.H, but solving for T+T, not h. After it all compiled, I got the runtime error message:

--> FOAM FATAL ERROR:
given field does not correspond to patch. Patch size: 10 field size: 0

From function PatchToPatchInterpolation::faceInterpolate(const Field<Type> ff)
in file /usr/local/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/PatchToPatchInterpolate.C at line 133.

FOAM aborting

gdb showed that the error was spawned by the coupled solver solving for T+T.

I backed up and took out all references to the turbulence and thermo models. Fields defined by the thermo model became defined in the 0/ directory (or got left out altogether). The code then ran.

Reinstating the code to create the thermo and turbulence models (without using them later in the solver) brought back the error. Both T eqns referenced rho and Cp in the ddt terms. Coupling those didnít help. I made the application steady, basing solveFluid.H on rhoSimpleFoam. Then only k and T were common to both temperature equations:

coupledFvScalarMatrix TEqns(2);

// Add fluid equation
TEqns.set
(
0,
new fvScalarMatrix
(
fvm::div((fvc::interpolate(Cp)*phi), T)
- fvm::laplacian(k, T)
)
);

// Add solid equation
TEqns.set
(
1,
new fvScalarMatrix
(
-fvm::laplacian(kSolid, Tsolid)
)
);

TEqns.solve();

The problem remains: If I donít create the thermo and turbulence models, the code runs, but when I create them I get the problem in the coupled T+T solution.

Any help will be greatly appreciated! Thanks.
helmut is offline   Reply With Quote

Old   December 8, 2011, 11:22
Default
  #2
New Member
 
Helmut Roth
Join Date: Mar 2009
Posts: 23
Rep Power: 8
helmut is on a distinguished road
The above problem was solved by creating the thermo model after creating all of the fields. Simple, really.
helmut is offline   Reply With Quote

Reply

Tags
conjugateheatfoam, thermophysical model

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiphaseInterFoam for RAS turbulence model chiven OpenFOAM Bugs 7 August 23, 2011 02:52
help for different between les model (subgrid-scale model) liuyuxuan FLUENT 1 October 2, 2009 15:25
2 stage axial turbine model convergence issues sherifkadry CFX 2 September 7, 2009 20:51
multi fluid mixture model issue rystokes CFX 3 August 9, 2009 19:13
Advanced Turbulence Modeling in Fluent, Realizable k-epsilon Model Jonas Larsson FLUENT 5 March 13, 2000 04:27


All times are GMT -4. The time now is 07:26.