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

Implementation of div, laplacian, etc and variables

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2009, 13:07
Default Implementation of div, laplacian, etc and variables
  #1
Member
 
Sven Winkler
Join Date: May 2009
Posts: 70
Rep Power: 17
sven is on a distinguished road
Hi everyone,

I want to edit the LaunderGibson RSTM provided with the normal OpenFOAM distribution. Before I can do this, I first need to understand the originally implemented model. For doing this I need to know where exactly, that is in which file of the OpenFOAM package the functions div, laplacian, etc are defined. Does anyone know in which file these are defined?
Furthermore, how can I figure out where variables like U or R are defined in OpenFOAM (that is again, in which file)?
Thanks for your help!
sven is offline   Reply With Quote

Old   July 18, 2009, 07:52
Default
  #2
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
Dear Sven,

Quote:
Before I can do this, I first need to understand the originally implemented model. For doing this
Don't think so

Quote:
I need to know where exactly, that is in which file of the OpenFOAM package the functions div, laplacian, etc are defined. Does anyone know in which file these are defined?
The functions that you use on the top-level are defined in:

$FOAM_SRC/finiteVolume/lnInclude/fvmDiv.H
$FOAM_SRC/finiteVolume/lnInclude/fvmLaplacian.H

and so forth

The upwind-scheme, for example, is defined in line 132 of

$FOAM_SRC/finiteVolume/lnInclude/upwind.H

Quote:
Furthermore, how can I figure out where variables like U or R are defined in OpenFOAM (that is again, in which file)?
$FOAM_SRC/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H (line 100)

$FOAM_SOLVERS/incompressible/turbFoam/createFields.H (lines 15-27)

Hope this helps,

Henrik
henrik is offline   Reply With Quote

Old   July 19, 2009, 16:31
Default
  #3
Member
 
Sven Winkler
Join Date: May 2009
Posts: 70
Rep Power: 17
sven is on a distinguished road
First of all thanks for the reply. I scanned through the files you mentioned and I could find all of the definitions and all the variables I was looking for. But I want to see of what kind the variables are (array with size, scalar, etc.). I think this is defined by words like "volVectorField", so I guess there must be another file in which this volVectorField is defined. Is this correct? and if so, where can I find this file? Thanks a lot!
sven is offline   Reply With Quote

Old   July 19, 2009, 19:18
Default
  #4
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
Dear Sven,

R is instantiated in LaunderGibsonRSTM.C:

Code:
R_
(
    IOobject
    (
        "R",
        runTime_.timeName(),
        mesh_,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh_
),
and U is instantiated in createFieds.H. As you can see, both files are read from disk and that is where all the information (values, dimensions, boundary conditions, etc.) is coming from.

Henrik
henrik is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 14:11.