CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Some question about the adjustPhi function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2009, 20:10
Default Some question about the adjustPhi function
  #1
New Member
 
Liu Huafei
Join Date: Mar 2009
Location: Shanghai, China
Posts: 20
Rep Power: 17
liuhuafei is on a distinguished road
Hi,Foamers
I have some questions about the adjustPhi function.

1) At the beginning of the adjustPhi, the value of p.NeedReference determines whether we need adjust the mass flux of boundaries. why?
If pressure field doesn't need the reference level, the adjustion of the boundary flux can be neglected?

2)what is meaning of Up.fixesValue()&& !isA<inletOutletFvPatchVectorField>(Up) ?
What type of boundary is fixedMassOut?


Thanks in advance!





bool Foam::adjustPhi (
surfaceScalarField& phi,
const volVectorField& U,
volScalarField& p
)
{
if (p.needReference())
{
p.boundaryField().updateCoeffs();

scalar massIn = 0.0;
scalar fixedMassOut = 0.0;
scalar adjustableMassOut = 0.0;

forAll (phi.boundaryField(), patchi)
{
const fvPatchVectorField& Up = U.boundaryField()[patchi];
const fvPatchScalarField& phip = phi.boundaryField()[patchi];

if (!isType<processorFvPatchScalarField>(phip))
{
if
(
Up.fixesValue()
&& !isA<inletOutletFvPatchVectorField>(Up)
)
{
forAll(phip, i)
{
if (phip[i] < 0.0)
{
massIn -= phip[i];
}
else
{
fixedMassOut += phip[i];
}
}
}
........................
}
else
{
return false;
}
}
liuhuafei is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 06:59
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
Custom Field Function Question Jason FLUENT 0 August 4, 2004 10:23


All times are GMT -4. The time now is 23:19.