|
[Sponsors] |
Defining Zone-Specific Initial Conditions (Single Region) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 2, 2018, 20:47 |
Defining Zone-Specific Initial Conditions (Single Region)
|
#1 |
New Member
Brandon Gleeson
Join Date: Apr 2018
Posts: 26
Rep Power: 8 |
I am simulating compressible, transient, turbulent internal flow across a butterfly plate valve in OpenFOAM (plan to compare rhoCentralFoam and sonicFoam).
My mesh consists of three zones (see attached image): 1. An "inlet" pipe with structured hex mesh 2. A "valve" center zone with tetrahedral mesh, contains the butterfly geometry 3. An "outlet" pipe with structured hex mesh The mesh was generated in FLUENT, then i used: fluentMeshToFoam <meshFile.msh> -writeZones This appears to successfully populate the "cellZones" dictionary with my three zones in the polyMesh directory. The flow will will progress from a pressure-driven boundary condition at the inlet face patch, towards a fixed pressure boundary condition at the outlet patch. For initial conditions, instead of setting the entire "internalField" to the same pressure, velocity, etc., I'd like to initialize the three zones to different values that are expected to represent the final time step more closely. Is there a way to do this in the /0/ dictionary files? I tried replacing internalField with definitions for each cellZone but OpenFOAM didn't like that. I've seen the tutorials that have multiple REGIONS defined, but these seem to be intended for multiple media types or physics models e.g. solid and fluid. Can I avoid separate regions for this case by somehow specifying different cellZone boundary condtions for my case? Thanks! CSMDakota |
|
June 21, 2019, 18:57 |
|
#2 |
New Member
Brandon Gleeson
Join Date: Apr 2018
Posts: 26
Rep Power: 8 |
...14 months later, I'm back with a solution to my original post. Two possible ways to achieve what I was looking for:
1. use the setFields utility. This requires defining a setFieldsDict in /system, where one can define a volume and convert the internal field cells to desired values, e.g. p, t, U. The dam-break tutorial shows how to use this. 2. another way, possibly more robust but requiring more setup, is to run a steady state and/or first order and/or coarse mesh initial run to allow the flow field to "rough in". then use the mapFields utility to map that field onto the transient/fine mesh/second order case. |
|
April 19, 2020, 22:18 |
|
#3 |
Member
Rui
Join Date: Apr 2015
Location: Montreal. CA
Posts: 49
Rep Power: 11 |
I am trying to do almost the same thing. in fluent I can draw different zones beforehand and use "patch" to initialize specific zones with specific values.
https://openfoamwiki.net/index.php/TopoSet TopoSet might be helpful for some cases, what I need to do is a more complicated geometry, might not be simply represented by a boxToCell or cylinderToCell. I assume there must be some other alternatives... |
|
Tags |
cellzones, initial conditions, internalfield |
|
|
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 |
How I can introduce my power heat (W) in chtMultiRegionFoam? | aminem | OpenFOAM Pre-Processing | 32 | August 29, 2019 03:23 |
p_rgh initial residual no change with different settings | manuc | OpenFOAM Running, Solving & CFD | 3 | June 26, 2018 16:53 |
Segmentation fault when using reactingFOAM for Fluids | Tommy Floessner | OpenFOAM Running, Solving & CFD | 4 | April 22, 2018 13:30 |
pisoFoam with k-epsilon turb blows up - Some questions | Heroic | OpenFOAM Running, Solving & CFD | 26 | December 17, 2012 04:34 |