CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Parameter input file

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By H.Tofighian

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 19, 2016, 02:18
Default Parameter input file
  #1
New Member
 
Foreign (non-US/Canada)
Join Date: Sep 2016
Posts: 3
Rep Power: 9
LucDirven is on a distinguished road
Hi,

I have been using OpenFOAM for a few weeks now and all the threads on this forum has helped me tremendously. However, I am stuck know on the following issue:

I want to make a input parameter dictionary that OpenFOAM reads before running blockMesh and the solver. In this parameter file I want to define (for example) a geometry property, lets say the size of a cube used by blockMesh. How can I read the dictionary?

This thread has been helpfull:

http://www.cfd-online.com/Forums/ope...ictionary.html

I understand that you can read the dictionary with IOdictionary, but where do a place this code? In the controlDict?

Any help would be great!
LucDirven is offline   Reply With Quote

Old   April 27, 2020, 05:02
Default
  #2
New Member
 
Athanasios Niotis
Join Date: Aug 2018
Posts: 12
Rep Power: 7
thanosniotis is on a distinguished road
Hello there,

I am trying to to the same! I would like to define somehow in an external directory the values of the points of blockMesh as well as the values in toposet dicts for the regions of the mesh refinement. Is there anybody with an idea how this could be achieved?

Best Regards,
Thanos
thanosniotis is offline   Reply With Quote

Old   April 27, 2020, 06:22
Default
  #3
New Member
 
Hesam Tofighian
Join Date: Mar 2019
Posts: 11
Rep Power: 7
H.Tofighian is on a distinguished road
Why don't you use the "m4" to make "blockMeshDict" automatically?

you can define your parameter in "m4" file (for example: blockMeshDict.m4) and then use the following command:
Code:
m4 -P blockMeshDict.m4 > blockMeshDict
check the link to find out how to use "m4":
thanosniotis likes this.
H.Tofighian is offline   Reply With Quote

Reply

Tags
iodictionary, openfoam, parameter variation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 17:25
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 03:04
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23


All times are GMT -4. The time now is 10:32.