Update boundary conditions calculated by an external program
How can I update boundary conditions, calculated by an external program, in OpenFoam 1.6 while running a case?
The program was originally written for Fluent. It generates a file boundary.txt which contains pressure boundary conditions. Fluent reads these boundary conditions, iterates 30 times and outputs some variables in a file var.txt. This file is read in the external program and this program calculates new boundary conditions in the file boundary.txt which is read in Fluent, ... The process is stopped when the program generates a stop file.
The journal file for Fluent is rather straigthforward:
Is there a better method, comparable to the Fluent script, to achieve this?
The text replacement is faster than foreseen and is not the bottleneck!
However, when running MPI cases, my method does not work anymore as the boundary conditions are spreaded across the several processor directories. Is there a way to change the boundary conditions in a generic way like the command "file read-bc" in Fluent?
It seems that this is not possible and that I have to use another boundary field than fixedValue.
I've looked at timeVaryingUniformFixedValue, but the values have to be known before the run starts and it interpolates the values. I'm searching for a boundary field that can read boundary conditions at runtime and does not interpolate.
I'm rather new to OpenFoam so I don't know how to modify an existing boundary field. Maybe somebody can help me?
|All times are GMT -4. The time now is 09:18.|