|
[Sponsors] |
October 21, 2008, 05:19 |
Off-hand I know there's an oka
|
#21 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
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 |
|
October 21, 2008, 07:45 |
Many thanks!
I'll have a lo
|
#22 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
Many thanks!
I'll have a look at it. /Niklas |
|
November 16, 2008, 12:16 |
Hi again,
I never had time
|
#23 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
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: createChangeDictionaryDict.py May be useful. ( run with --help :-) ) /N |
|
November 16, 2008, 12:54 |
To explain the previous post:
|
#24 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
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 |
|
October 29, 2009, 07:40 |
createFieldTemplates revisited
|
#25 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
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 |
|
November 14, 2013, 08:38 |
|
#26 |
New Member
Siemen Dasselaar
Join Date: Jul 2013
Posts: 3
Rep Power: 13 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
restart a case with .trn file in command line way? | wayne | CFX | 0 | October 10, 2008 10:02 |
Command line help | Omer | CFX | 0 | August 29, 2008 08:44 |
Cloning a case or creating a new case for 16 processes | mellanoxuser | OpenFOAM Running, Solving & CFD | 0 | February 8, 2008 17:52 |
Backup from the command line | Rui | CFX | 6 | February 22, 2005 11:19 |
Cloning a case from the command line | Daniele Panara (Panara) | OpenFOAM Pre-Processing | 2 | February 1, 2005 10:58 |