|
[Sponsors] |
April 30, 2009, 09:51 |
local courant number
|
#1 |
Senior Member
Pawel Sosnowski
Join Date: Mar 2009
Location: Munich, Germany
Posts: 105
Rep Power: 18 |
Hello,
I would like to find out what is the local courant number in my computational domain. The CoNum calculated by supported functions uses the surface scalar field phi, calculates the value for each face and outputs the max and mean value. My idea was in general: - create volScalarField vsfCoNum and use it as output - in each time step: - - calculate surfaceScalarField surfCoNum - - for each cell in vsfCoNum - - - find cell`s faces - - - assign max value of surfCoNum of those found faces to vsfCoNum I tried to implement it like this: void incompressibleCourantNo ( const volScalarField &vsfCoNum, const fvMesh &mesh, const Time &runTime, const surfaceScalarField &phi ) { surfaceScalarField SfUfbyDelta = mesh.surfaceInterpolation::deltaCoeffs()*mag(phi); surfaceScalarField CoNumSurfField ( (SfUfbyDelta/mesh.magSf()) * runTime.deltaT().value() ); forAll(vsfCoNum, cell){ vsfCoNum[cell] = (...) } } Unfortunately the assigment CoNum[cell] = (...) announces that this is "assignment for read only location". The same was with CoNum.internalField()[cell] = (...). I know that there is some easy way to set the value at certain cell but I simply have problem with finding it. Could you Foamers help me? Pawel |
|
May 13, 2010, 10:57 |
|
#2 |
Senior Member
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 17 |
Hi Pawel,
Are you able to calculate Local Courant no? If so can you post the code? I also want to do the same. Regards mecbe |
|
May 13, 2010, 14:01 |
|
#3 |
Senior Member
Pawel Sosnowski
Join Date: Mar 2009
Location: Munich, Germany
Posts: 105
Rep Power: 18 |
Unfortunately I cannot find the code… Since some time I did not touch OF directly, and my data are a bit in a mess…
But I am sure that I finally managed to use the idea that I described almost a year ago. The problem was to get to the data that you need, that is while having a cell number, find the faces that are “building “ that cell. But after some attempts it was possible. The code from last year points to some invalid data, you have to find another way to get the faces corresponding to a cell. |
|
May 14, 2010, 02:58 |
|
#4 |
Senior Member
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 17 |
Hi,
Thanks for the reply. I will work on it. Regards mecbe |
|
Tags |
cell value, courant, courant number |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
DecomposePar unequal number of shared faces | maka | OpenFOAM Pre-Processing | 6 | August 12, 2010 10:01 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |