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/)
-   -   Calculated Values in scalar field (http://www.cfd-online.com/Forums/openfoam-solving/59611-calculated-values-scalar-field.html)

arkangel June 28, 2007 07:53

Hi pple http://www.cfd-online.
 
Hi pple http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

I want to solve
solve( laplacian(1,Phi) == RHS);

I am creating RHS and Phi in this manner:

volScalarField RHS
(
IOobject
(
"RHS",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh
);


how can i specify values in the RHS field, depending on coordinates or/and time. For instances:

RHS(x,y,z)=cos(x)sin(yz)*t for t> 0

Thanks

Rivera


All times are GMT -4. The time now is 05:24.