CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Problem with total enthalpy (http://www.cfd-online.com/Forums/openfoam-solving/80170-problem-total-enthalpy.html)

HaitAV September 17, 2010 04:44

Problem with total enthalpy
 
Hello everyone!

I have some problem with openFOAM when I try to edit energy model in sonicFoam (hEqu file). I want to change h variable on htot variable (total enthalpy).
For that purpose I try to add new field to file createFields.H:
1) volScalarField& htot = (h + 0.5 * magSqr(U));
In that case I took following message during compilation:
error: invalid initialization of non-const reference of type
‘Foam::volScalarField&’ from a temporary of type ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >’
2) volScalarField htot
(
IOobject
(
"htot",
runTime.timeName(),
mesh
),
(h + 0.5 * sqr(mag(U)))
);
In that case I have no errors during compilation, but I have following error during solving energy equation:
valueInternalCoeffs cannot be called for a calculatedFvPatchField
on patch BODY_0_ of field htot in file "/home/hait/OpenFOAM/hait-1.6/run/VT5_OF_28/0/htot"
You are probably trying to solve for a field with a default boundary condition.

I need a help.
Thanks a lot!


All times are GMT -4. The time now is 00:04.