|
[Sponsors] |
Possible to setup a case with only one masterfile? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 9, 2020, 09:04 |
Possible to setup a case with only one masterfile?
|
#1 |
Member
Join Date: Oct 2011
Posts: 53
Rep Power: 15 |
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 |
|
December 10, 2020, 07:03 |
|
#2 |
Member
Join Date: Oct 2011
Posts: 53
Rep Power: 15 |
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 |
|
December 11, 2020, 10:04 |
|
#3 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
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. |
||
|
|
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 07:35 |
[DesignModeler] DesignModeler Scripting: How to get Full Command Access | ANT | ANSYS Meshing & Geometry | 53 | February 16, 2020 16:13 |
Piston-Cylinder Pressure Driven Flow Case Setup | Ballistics_Sim | OpenFOAM Pre-Processing | 0 | February 2, 2018 10:11 |
Can`t Setup ONERA optimization case | McAero | SU2 | 6 | November 15, 2017 09:29 |
OpenFOAM Case Setup Needed | mpl | CFD Freelancers | 4 | October 10, 2013 17:14 |