Problem with total enthalpy
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
(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 15:48.|