CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   createBaffles boundary conditions with internalField (https://www.cfd-online.com/Forums/openfoam/218973-createbaffles-boundary-conditions-internalfield.html)

ECruz July 10, 2019 10:45

createBaffles boundary conditions with internalField
 
Hi everyone,


I'm running some simulations that use the createBaffles utility. The thing is I am running them multiple times with different values. So ideally I'd like to do something like this in the createBafflesDict


Code:

patchFields
{
    omega
    {
        type            omegaWallFunction;
        value          $internalField;
    }
    ...
}

to avoid changing the file manually every time. But doing it this way, I get the error


Code:

--> FOAM FATAL IO ERROR:
Illegal dictionary entry or environment variable name "internalField"
Valid dictionary entries are 1(type)

Is there any way I can do this?


Regards,


ECruz

Yann July 11, 2019 03:29

Hello Eduardo,

AFAIK with createBaffles you can specify the generic type of boundary (wall, patch, etc..) but not directly define the boundary conditions as you tried to do in your example.
But you can use changeDictionary utility, with changeDictionaryDict to update your boundary conditions.

That being said, I am not sure to totally understand what you mean when you say:

Quote:

Originally Posted by ECruz (Post 738586)
The thing is I am running them multiple times with different values.

Can you elaborate? Depending on what you need to do maybe there are other solutions.


Yann

ECruz July 12, 2019 13:31

Quote:

Can you elaborate? Depending on what you need to do maybe there are other solutions.
Yes, I'm running the same case with many different inlet velocities, which in turn imply different boundary conditions for k and omega.


Quote:

AFAIK with createBaffles you can specify the generic type of boundary (wall, patch, etc..) but not directly define the boundary conditions as you tried to do in your example.
If i change $internalField for a specific value, it works. But this way I need to manually change createBafflesDict everytime. I'd like to avoid that.


ECruz

Yann July 15, 2019 12:15

Then you can use changeDictionary to update your boundary conditions and internal field initialization with new values.
But you'll have to set those values in the changeDictionaryDict anyway.


You can use shell scripting to automatically update files, whether it is directly editing the files or doing it though changeDictionary.


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