Defining fields as functions of space
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? |
You need to loop over the cells and manually assign them values. Same for the boundary, you can use a fixedValue BC and assign values to patch faces.
|
Which solver do you use?Maybe you can try the funkysetfields in the swak4foam.
|
All times are GMT -4. The time now is 10:37. |