|
[Sponsors] |
October 10, 2008, 23:23 |
Hi Ivan
fvc::div(...
|
#1 |
Senior Member
|
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 |
|
October 11, 2008, 04:07 |
Thank you Junwei for your fast
|
#2 |
Senior Member
|
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!! |
|
October 11, 2008, 08:23 |
Hi Ivan
It seems that mesh
|
#3 |
Senior Member
|
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 |
|
October 11, 2008, 08:26 |
Hi Ivan
A little more,
|
#4 |
Senior Member
|
Hi Ivan
A little more, declare the volScalarField rhsRho1 behand please. Junwei |
|
October 12, 2008, 09:36 |
I'm a little confused, because
|
#5 |
Senior Member
|
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 |
|
October 12, 2008, 15:48 |
This is a recent change: mesh.
|
#6 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33 |
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
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
October 13, 2008, 07:09 |
Thank you Prof. Jasak,
now I
|
#7 |
Senior Member
|
Thank you Prof. Jasak,
now I catch this part of the problem. Cheers! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
return code 2 | Kwang-su Kim | CFX | 5 | April 21, 2011 18:03 |
return code 47 | Fernando | CFX | 0 | May 15, 2008 06:29 |
Return Code 2 - CFX 11.0 AMD 64 | Bayard Morales | CFX | 0 | December 5, 2007 08:36 |
return code 127 | Dave | CFX | 1 | September 27, 2006 22:11 |
Return code 255 (CFX-5.7.1) | Jesper | CFX | 4 | May 23, 2005 08:03 |