adding thermophysical model to conjugateHeatFoam
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.
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:
// Add fluid equation
- fvm::laplacian(k, T)
// Add solid equation
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.
The above problem was solved by creating the thermo model after creating all of the fields. Simple, really.
|All times are GMT -4. The time now is 19:17.|