CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Defining fields as functions of space

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2015, 08:40
Default Defining fields as functions of space
  #1
New Member
 
James Shaw
Join Date: May 2014
Posts: 8
Rep Power: 11
hertzsprung is on a distinguished road
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?
hertzsprung is offline   Reply With Quote

Old   July 3, 2015, 05:08
Default
  #2
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
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.
chriss85 is offline   Reply With Quote

Old   July 4, 2015, 09:03
Default
  #3
New Member
 
nemo
Join Date: Jan 2015
Posts: 26
Rep Power: 11
huyidao is on a distinguished road
Which solver do you use?Maybe you can try the funkysetfields in the swak4foam.
huyidao is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 20:19.