CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Replacing components in a scalarField (http://www.cfd-online.com/Forums/openfoam-solving/59833-replacing-components-scalarfield.html)

grtabor February 5, 2007 12:00

Dear All, I've been working
 
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

hjasak February 5, 2007 13:24

Any direction will do -it's no
 
Any direction will do -it's not used. scalarField.C

Hrv


All times are GMT -4. The time now is 06:27.