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

Replacing components in a scalarField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 5, 2007, 12:00
Default Dear All, I've been working
  #1
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
Dear All,

I've been working on inlet conditions, setting the inlet velocity to particular components, using a line of code

U.boundaryField()[patchNo].replace(Vector::X,UInletX);

which replaces the X component of the boundary field at patch patchNo with the values in UInletX. So far, so good.

I'm now trying to manipulate the pressure field at the boundary in a similar manner. Pressure is a scalar. I can't work out what form of the .replace() function I should be using for a scalar - it seems to have only the form

.replace(const direction, const UList<cmptType&)

What "direction" is appropriate for a scalar, or should I be doing this in some other way?

Gavin
grtabor is offline   Reply With Quote

Old   February 5, 2007, 13:24
Default Any direction will do -it's no
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Any direction will do -it's not used. scalarField.C

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak 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
How to sum up scalarField wese OpenFOAM Running, Solving & CFD 2 August 19, 2019 18:30
max for scalarField maka OpenFOAM Bugs 9 February 19, 2009 10:43
Replacing Zones Steve FLUENT 0 December 4, 2007 01:13
[CGNS] Computing a cellcentered scalarField from a vertexcentered scalarField mbeaudoin OpenFOAM Meshing & Mesh Conversion 10 February 22, 2007 08:43
problems replacing old boundaries Jared Siemens 4 August 5, 2005 20:36


All times are GMT -4. The time now is 11:55.