CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   non uniform initial conditions (https://www.cfd-online.com/Forums/openfoam-pre-processing/130102-non-uniform-initial-conditions.html)

ajnewman February 19, 2014 14:09

non uniform initial conditions
 
Hello all,

Simple (?) question: If I want to specify a nonuniform initial condition using the internalField nonuniform List<vector> approach, like in the boxTurb tutorial, do I specify my initial velocity at all the points listed in the "points" file and in that order? That is, if the first entry in points is (0,0,0) should the first entry in U be the velocity at (0,0,0)? This simulation has multiple blocks.

I have seen the setFields as used in the dam break tutorial but am not currently savvy enough to use this to do what I want.

The background is I am attempting to run a simulation in OpenFOAM starting with an initial condition generated by a fortran code on a mesh that is not the same as my OpenFOAM mesh.

Any input is appreciated.

-Jensen

ajnewman February 19, 2014 14:49

I think I answered a bit of my own question since the points file has (no_cells_x+1)*(no_cells_y+1)*(no_cells_z+1) entries whereas a nonuniform velocity entry should have only (no_cells_x)*(no_cells_y)*(no_cells_z) entries. Based on this I am guessing that velocity needs to be spec'd at cell centers.

zhengzh5 February 19, 2014 17:03

Quote:

Originally Posted by ajnewman (Post 475756)
I think I answered a bit of my own question since the points file has (no_cells_x+1)*(no_cells_y+1)*(no_cells_z+1) entries whereas a nonuniform velocity entry should have only (no_cells_x)*(no_cells_y)*(no_cells_z) entries. Based on this I am guessing that velocity needs to be spec'd at cell centers.

you're right on. it's finite-volume approach. So all volScalarFields/volVectorFields are specified at the cell-center. Surface and point values are usually interpolated based on cell-center values.


All times are GMT -4. The time now is 18:51.