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

Initial Condition Settings for rhoCentralFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 22, 2016, 21:41
Default Initial Condition Settings for rhoCentralFoam
  #1
New Member
 
Hang S.
Join Date: Oct 2016
Posts: 2
Rep Power: 0
hangs is on a distinguished road
Hello,

I want to simulate the flow in a shock tube by using rhoCentralFoam solver with a wedge geometry (axisymmetric, 2D). In order to set the different pressure values for the driven and driver sections, I edited the file "setFieldsDict" and run "setFields" function before I run "rhoCentralFoam" solver.

In "setFieldsDict" file, I used "boxToCell" to identify the cells in driver section (although I do not think it is a best way), so I draw a sufficiently big box (at least I think it was sufficient) to cover all the driver section so that I can set a high pressure. However, I did not work well, in the test results, only the pressure at the side wall of the driver section was the changed, all others were not. So I am writing to look for some tips about how to specify the nonuniform initial conditions.

By the way, I generated the mesh with Gmesh where I specified the physical volume "driver_section" and "driven_section", and I can see them after I run "gmshToFoam" in "constant/polyMesh/cellZones.c" with groups of numbers. So is any way that I can take advantage of these "zone names" for specify initial conditions?

Also, please let me know if I missed any important step. This is my first time using OpenFoam.

Thanks so much for your help!
hangs is offline   Reply With Quote

Old   November 18, 2016, 23:58
Default
  #2
Senior Member
 
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11
usv001 is on a distinguished road
Hi there,

You probably can use 'zoneToCell' in setFieldsDict instead of 'boxToCell'. Your setFieldsDict should look something like this:

Code:
defaultFieldValues
(
    ... // set"driven_section" values
);

regions
(
    zoneToCell
    {
        name    "driver_section";
        fieldValues
        (
            ... // set "driver_section" values
        );
    }
);
USV
usv001 is offline   Reply With Quote

Reply

Tags
cell specification, initial conditions, openfoam, rhocentralfoam, setfieldsdict


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
Maximum number of iterations exceeded chtmultiregionsimpleFoam Moncef OpenFOAM Running, Solving & CFD 28 July 13, 2020 15:26
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 03:50
Cannot run the code properly: very large time step continuity error crst15 OpenFOAM Running, Solving & CFD 9 December 14, 2014 19:17
Simulation seems to converge but crashes suddenly xxxx OpenFOAM 16 September 12, 2014 09:07
should Courant number always be kept below 1? wc34071209 OpenFOAM Running, Solving & CFD 16 March 9, 2014 20:31


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