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

local courant number

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2009, 09:51
Default local courant number
  #1
Senior Member
 
Pawel Sosnowski
Join Date: Mar 2009
Location: Munich, Germany
Posts: 105
Rep Power: 18
psosnows is on a distinguished road
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
psosnows is offline   Reply With Quote

Old   May 13, 2010, 10:57
Default
  #2
Senior Member
 
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 16
mecbe2002 is on a distinguished road
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
mecbe2002 is offline   Reply With Quote

Old   May 13, 2010, 14:01
Default
  #3
Senior Member
 
Pawel Sosnowski
Join Date: Mar 2009
Location: Munich, Germany
Posts: 105
Rep Power: 18
psosnows is on a distinguished road
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.
psosnows is offline   Reply With Quote

Old   May 14, 2010, 02:58
Default
  #4
Senior Member
 
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 16
mecbe2002 is on a distinguished road
Hi,

Thanks for the reply.
I will work on it.

Regards
mecbe
mecbe2002 is offline   Reply With Quote

Reply

Tags
cell value, courant, courant number

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
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


All times are GMT -4. The time now is 06:44.