Hi Ivan
fvc::div(...
Hi Ivan
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 Junwei |
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? Bye!! |
Hi Ivan
It seems that mesh
Hi Ivan
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 Junwei |
Hi Ivan
A little more,
Hi Ivan
A little more, declare the volScalarField rhsRho1 behand please. Junwei |
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, Ivan |
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. Enjoy, Hrv |
Thank you Prof. Jasak,
now I
Thank you Prof. Jasak,
now I catch this part of the problem. Cheers! |
All times are GMT -4. The time now is 00:18. |