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

AlphaCourantNo code

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By danieldeising

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2013, 05:18
Default AlphaCourantNo code
  #1
Member
 
Join Date: Mar 2013
Posts: 98
Rep Power: 13
giack is on a distinguished road
Hi to all
I want to know how is calculated AlphaCourantNo so I look for the code and I find this lines.

if (mesh.nInternalFaces())
{
scalarField sumPhi
(
pos(alpha1 - 0.01)*pos(0.99 - alpha1)
*fvc::surfaceSum(mag(phi))().internalField()
);

alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

}

My understanding of this piece of code is that for each cell it sums the face flux magnitudes, divides it by the cell volume and multiplies it with deltaT/2. The maximum over all cells is then the Courant number.
But I don't understand the meaning of this term:

pos(alpha1 - 0.01)*pos(0.99 - alpha1)

Anyone kwon the meaning of it?
Thank to all
giack is offline   Reply With Quote

Old   May 25, 2014, 09:07
Default
  #2
New Member
 
enzhen zhang
Join Date: Dec 2013
Location: Shanghai,China
Posts: 10
Rep Power: 12
pixarzhang is on a distinguished road
Quote:
Originally Posted by giack View Post
Hi to all
I want to know how is calculated AlphaCourantNo so I look for the code and I find this lines.

if (mesh.nInternalFaces())
{
scalarField sumPhi
(
pos(alpha1 - 0.01)*pos(0.99 - alpha1)
*fvc::surfaceSum(mag(phi))().internalField()
);

alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

}

My understanding of this piece of code is that for each cell it sums the face flux magnitudes, divides it by the cell volume and multiplies it with deltaT/2. The maximum over all cells is then the Courant number.
But I don't understand the meaning of this term:

pos(alpha1 - 0.01)*pos(0.99 - alpha1)

Anyone kwon the meaning of it?
Thank to all
I have the same question.Does anyone know the meaning?
pixarzhang is offline   Reply With Quote

Old   May 30, 2014, 08:47
Default
  #3
New Member
 
Daniel Deising
Join Date: Feb 2013
Location: Darmstadt, Germany
Posts: 2
Rep Power: 0
danieldeising is on a distinguished road
Hi enzhen,
this line
Code:
pos(alpha1 - 0.01)*pos(0.99 - alpha1)
gives you all cells where the volumetric phase fraction takes
values between 0.01 and 0.99.
And this piece of code
Code:
0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
is the definition of the Courant number in multiple dimensions,
assuming that the calculated velocity field is divergence free.

So as a result, you obtain a Courant number in the interfacial area.

Hope this helps,

Best,
Daniel
babakflame and ZZW like this.
danieldeising is offline   Reply With Quote

Old   May 31, 2014, 12:58
Default
  #4
New Member
 
enzhen zhang
Join Date: Dec 2013
Location: Shanghai,China
Posts: 10
Rep Power: 12
pixarzhang is on a distinguished road
Quote:
Originally Posted by danieldeising View Post
Hi enzhen,
this line
Code:
pos(alpha1 - 0.01)*pos(0.99 - alpha1)
gives you all cells where the volumetric phase fraction takes
values between 0.01 and 0.99.
And this piece of code
Code:
0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
is the definition of the Courant number in multiple dimensions,
assuming that the calculated velocity field is divergence free.

So as a result, you obtain a Courant number in the interfacial area.

Hope this helps,

Best,
Daniel
thanks ~that does help
pixarzhang is offline   Reply With Quote

Reply

Tags
alpha1, courant number, interfoam


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
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 12:30
How to make code run in parallel? cwang5 OpenFOAM Programming & Development 1 May 30, 2011 04:47
Open Source Vs Commercial Software MechE OpenFOAM 28 May 16, 2011 11:02
Small 3-D code Zdravko Stojanovic Main CFD Forum 2 July 19, 2010 10:11
public CFD Code development Heinz Wilkening Main CFD Forum 38 March 5, 1999 11:44


All times are GMT -4. The time now is 05:22.