Reputation: 9903
I have some initial conditions that are specified by functions of (x,y,z).
I would like to programmatically define a field whose values are a function of (x,y,z). Can this be done as part of field construction, rather than looping over cells/faces and setting each value individually?
Further, can I set the internal field and boundary values in a straightforward manner?
Upvotes: 1
Views: 1011
Reputation: 9997
You might want to use #codeStream
directive to enter the generating code directly in the field defining dictionary, see official documentation.
Also you might want to look at extensions such as groovyBC, funkySetFields or swak4Foam.
Upvotes: 1