Hi Ivan fvc::div(...
fvc::div(...) return tmp<geometricfield>
you can use set the variable to the type of geometricfield(including the internal and boundary field, and the data are dimensioned) or just use its internal field(undimensioned).
Hope this helps
Thank you Junwei for your fast
Thank you Junwei for your fast reply!
Ok, maybe I found the error, it is in:
volScalarField rhsRho1 = (- divPhiRho1 - rho0 * divPhiU1) / mesh.V();
In someway it doesn't like / mesh.V(), if I remove it, it compiles without errors. But now, 2 questions:
1) If I set a variable like this:
volScalarField a = b;
where b is a tmp<volscalarfield>,
the = assignment is valid?
2) It says that it find some Foam::tmp<foam::field<double> >, and as the only thing I have removed is mesh.V(), the latter should be the tmp, but in the programmer's guide i read that it's a volScalarField. How it is possible?
Hi Ivan It seems that mesh
It seems that mesh.V() is a dimensionedField,Try the following code segment
volScalarField rhsRho1.dimensionedInternalField()= (- divPhiRho1 - rho0 * divPhiU1).dimensionedInternalField() / mesh.V();
It seems that there is not a member for volScalarField dividing dimensionedField
Hi Ivan A little more,
A little more, declare the volScalarField rhsRho1 behand please.
I'm a little confused, because
I'm a little confused, because the programmer's guide says that the .V() member of mesh should be a volScalarField. Could it be a bug in the programmer's guide?
Moreover, I found out that if I just delete mesh.V() from the right hand side of
df/dt = -div(flux)
it works. The results are coherent! So, the result of fvc::div is already divided by the cell volume?
Have a nice sunday,
This is a recent change: mesh.
This is a recent change: mesh.V() is now a dimensioned field, ie. it does not have boundary conditions.
Yes, fvc::div(phi) is divided by the cell volume.
Thank you Prof. Jasak, now I
Thank you Prof. Jasak,
now I catch this part of the problem.
|All times are GMT -4. The time now is 09:07.|