|
[Sponsors] |
April 30, 2009, 08: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 |
|
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 15:33 |
DecomposePar unequal number of shared faces | maka | OpenFOAM Pre-Processing | 6 | August 12, 2010 09:01 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 07:36 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 02:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |