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

Creating a new case from command line

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2008, 05:19
Default 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
olesen has a spectacular aura aboutolesen has a spectacular aura about
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
olesen is offline   Reply With Quote

Old   October 21, 2008, 07:45
Default Many thanks! I'll have a lo
  #22
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Many thanks!

I'll have a look at it.

/Niklas
wikstrom is offline   Reply With Quote

Old   November 16, 2008, 12:16
Default Hi again, I never had time
  #23
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
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
wikstrom is offline   Reply With Quote

Old   November 16, 2008, 12:54
Default To explain the previous post:
  #24
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
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
wikstrom is offline   Reply With Quote

Old   October 29, 2009, 07:40
Default createFieldTemplates revisited
  #25
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
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
Attached Files
File Type: gz createFieldTemplates.tar.gz (3.7 KB, 11 views)
wikstrom is offline   Reply With Quote

Old   November 14, 2013, 08:38
Default
  #26
New Member
 
Siemen Dasselaar
Join Date: Jul 2013
Posts: 3
Rep Power: 13
Siemen is on a distinguished road
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
Siemen is offline   Reply With Quote

Reply


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
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


All times are GMT -4. The time now is 05:26.