|
[Sponsors] |
September 25, 2012, 06:44 |
compute courant number for 3D geometry
|
#1 |
New Member
saeid oqaz
Join Date: Feb 2012
Posts: 19
Rep Power: 14 |
hi foamers.
i have 2 question about coutant number. in 3D geometry coutanr number calcualte as follows for any cell : ux.deltaT/deltax + uy.deltaT/deltay + uz.deltaT/deltaz does openfoam calculate co number same this formula? i read courantNo.H file and didnt understand about how calculate openfaom co number. next question : in my case courant number very little (in order e-16). why? |
|
September 25, 2012, 08:57 |
|
#2 |
Member
Meindert de Groot
Join Date: Jun 2012
Location: Netherlands
Posts: 34
Rep Power: 13 |
Hi Saeid,
OpenFOAM does something very similar to your approach. Code:
00037 scalarField sumPhi 00038 ( 00039 fvc::surfaceSum(mag(phi))().internalField() 00040 ); 00041 00042 CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); If you write it out, you will get exactly what you wrote in your post, with twice the amount of terms. I am not entirely sure about the factor 1/2, but my guess is that it has something to do with the fact that you get twice the amount terms. I hope this helps. |
|
September 25, 2012, 13:37 |
|
#3 |
New Member
saeid oqaz
Join Date: Feb 2012
Posts: 19
Rep Power: 14 |
the code you say for openfoam 2.1 . i use openFOAM ext.1-6. and i work on incompressible flow. in directory src / finiteVolume / cfdTools / incompressible / CourantNo.H
code : PHP Code:
thanks for replying me. |
|
September 25, 2012, 13:52 |
|
#4 |
Member
Meindert de Groot
Join Date: Jun 2012
Location: Netherlands
Posts: 34
Rep Power: 13 |
I'm not familiar with that version of OpenFOAM, but the implementation is not very different actually. deltaCoeffs() returns 1/[distance between owner cell center and neighbour cell center]. I think you should be able to figure out the rest for yourself.
|
|
September 25, 2012, 14:54 |
|
#5 |
Member
Meindert de Groot
Join Date: Jun 2012
Location: Netherlands
Posts: 34
Rep Power: 13 |
I'm sorry, I was in a hurry. The implementation in OpenFOAM-1.6-ext is different. It finds the maximum over all faces and uses it to calculate the Courant number.
So this is what it does: - calculate [face flux magnitude]/([distance from owner cell center to neighbour cell center]*[face area]) - take maximum over all faces and multiply the resulting value with deltaT |
|
September 25, 2012, 16:55 |
|
#6 |
New Member
saeid oqaz
Join Date: Feb 2012
Posts: 19
Rep Power: 14 |
hi Meindert
youe explanation was perfect and help me alot. thanks very much. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 04:13 |
On the Courant number . | raintung | FLUENT | 4 | June 2, 2016 12:26 |
Courant Number in unsteady problems... | vandadt | FLUENT | 0 | November 8, 2009 16:12 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 02:58 |
Courant number calculation - unsteady flow | Kuba | FLUENT | 0 | November 8, 2005 22:44 |