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

Possible to setup a case with only one masterfile?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2020, 08:04
Question Possible to setup a case with only one masterfile?
  #1
Member
 
Join Date: Oct 2011
Posts: 49
Rep Power: 14
fanta is on a distinguished road
Hi,
I do a lot of studies with basically the same OpenFOAM case. I have to setup a lot of cases, and i fill out U, T, p, tranportProperties etc manually for each case. So what i would like to do is use one file to create the case. I heard about changeDictionary, but i have never used it. I want to fill out one file, run a piece of software that changes the entries in my mastercase and then i am finished. The mesh is always different, so there is still some manual work to be done. How to do it? Is changeDictionary an option? Write a python/bash script? I use the OpenFOAM.com Version.



thanks, fanta
fanta is offline   Reply With Quote

Old   December 10, 2020, 06:03
Default
  #2
Member
 
Join Date: Oct 2011
Posts: 49
Rep Power: 14
fanta is on a distinguished road
I found a very simple solution. I write a file with the structure:
Code:
rho 910;
cp 1700;
...

and place it in the case. Then i include it in every file i have to substitute a variable. I use lines with #calc commands to evaluate certain values.
I am happy with that
fanta is offline   Reply With Quote

Old   December 11, 2020, 09:04
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by fanta View Post
I found a very simple solution. I write a file with the structure:
Code:
rho 910;
cp 1700;
...
and place it in the case. Then i include it in every file i have to substitute a variable. I use lines with #calc commands to evaluate certain values.
I am happy with that

What you describe sound a lot like what some of the tutorials already do. For example,
tutorials/incompressible/lumpedPointMotion/building/steady/ where the regular input values and the environment description are split into two files and included back in. In general, you should be able to avoid using #calc (or #eval) if you structure things properly.



The post is pretty old, but might still be helpful
http://olesenm.github.io/2009/11/17/...ludeIfPresent/


If you forget the bit about using "~OpenFOAM/" (which should be written as "<etc>/" these days, you will see that there a number of ways to structure things.
fanta likes this.
olesen 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
Pressure instabilities with interDyMFoam for the floatingObject case nbadano OpenFOAM Running, Solving & CFD 15 October 15, 2021 06:35
[DesignModeler] DesignModeler Scripting: How to get Full Command Access ANT ANSYS Meshing & Geometry 53 February 16, 2020 15:13
Piston-Cylinder Pressure Driven Flow Case Setup Ballistics_Sim OpenFOAM Pre-Processing 0 February 2, 2018 09:11
Can`t Setup ONERA optimization case McAero SU2 6 November 15, 2017 08:29
OpenFOAM Case Setup Needed mpl CFD Freelancers 4 October 10, 2013 16:14


All times are GMT -4. The time now is 04:29.