|
[Sponsors] |
June 30, 2015, 08:40 |
Defining fields as functions of space
|
#1 |
New Member
James Shaw
Join Date: May 2014
Posts: 8
Rep Power: 11 |
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? |
|
July 3, 2015, 05:08 |
|
#2 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 18 |
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.
|
|
July 4, 2015, 09:03 |
|
#3 |
New Member
nemo
Join Date: Jan 2015
Posts: 26
Rep Power: 11 |
Which solver do you use?Maybe you can try the funkysetfields in the swak4foam.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
divergence free of homogeneous isotroy T in real space (By using Rogallo's method) | hiter | Main CFD Forum | 11 | January 29, 2014 12:32 |
Missing fields in reconstructPar | flowris | OpenFOAM | 1 | July 9, 2010 02:48 |
domainIntegrate, dieselFoam and Lagrangian Fields | mturcios777 | OpenFOAM | 0 | May 14, 2010 15:16 |
PostChannel | maka | OpenFOAM Post-Processing | 5 | July 22, 2009 09:15 |
Fields functions in STAR CCM+ | tn | Siemens | 1 | February 15, 2006 09:29 |