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

Defining fields as functions of space

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools 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: 6
Rep Power: 3
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   Today, 05:08
Default
  #2
Senior Member
 
Join Date: Oct 2013
Posts: 237
Rep Power: 4
chriss85 is on a distinguished road
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

Reply

Thread Tools
Display Modes

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 On
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 13: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 CD-adapco 1 February 15, 2006 10:29


All times are GMT -4. The time now is 22:07.