Off-hand I know there's an oka
Off-hand I know there's an okay example of mis-using an IOMap<dictionary> to write the headers and supply a stream for a Map<dictionary> in src/conversion/meshTables/cellTable.?
Specifically, Foam::cellTable::readDict() and Foam::cellTable::writeDict() might be of some use to you as reference. BTW: in your original program, you were using include "createMesh.H", but you should be able to just read in the polyMesh/boundary directly (and save lots of time and memory). Take a look at src/OpenFOAM/meshes/preservePatchTypes/preservePatchTypes.C |
Many thanks!
I'll have a lo
Many thanks!
I'll have a look at it. /Niklas |
Hi again,
I never had time
Hi again,
I never had time to dive into the dictionary creation and writing inside OF. So, in the mean time I reverted to a simplistic solution and use the following python script to create the changeDictionaryDict: http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif createChangeDictionaryDict.py May be useful. ( run with --help :-) ) /N |
To explain the previous post:
To explain the previous post:
Using createFieldTemplates (above in this thread) and the python script above, the procedure I use to initiate fields for a case, after having built the mesh becomes e.g.: 1) createFieldTemplates -scalarFields "(p)" -vectorFields "(U)" -time 3 2) createChangeDictionaryDict.py --fields="U p" --instant=3 -o system/changeDictionaryDict 3) Edit system/changeDictionaryDict 4) changeDictionary -time 3 /N |
createFieldTemplates revisited
1 Attachment(s)
Uploading a createFieldTemplates that writes a changeDictionaryDict on the fly. Whether you want it or not... Use the -dict option. See description in source header.
/N |
Hi Hakan,
For my centrifugal pump simulations I inject the final solution from a steady-state simulation as initial solution for a transient simulation (using pyFoamCopyLastToFirst.py). The steady-state simulation computes the flow in a non-rotating impeller inside a volute. The transient simulation is about an impeller, which is rotating in a volute. In order to give the rotating impeller the correct boundary conditions, I have to change the type of boundary condition from "fixedValue" to "movingWallVelocity" in the [case/0/U]-file for the transient simulation. Therefore, I am trying to apply the function <pyFoamCreateBoundaryPatches.py>. However, it seems that both the type and value of the boundary condition are changed using this function, and I only want to change the type. Do you know whether it is possible to only change the type and remain the value of the boundary condition unchanged? Thanks in advance! Siemen |
All times are GMT -4. The time now is 14:38. |