CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Setting rootcase variable (http://www.cfd-online.com/Forums/openfoam-pre-processing/62198-setting-rootcase-variable.html)

carlo_fabrizi May 8, 2006 14:22

Hi, I'm trying to use the out
 
Hi,
I'm trying to use the output of one case as bc of another one.. It is a terrible task, now I need to know how I can change variable environment in a function that i use to read data.. in particular I run a modified simpleFoam as:

simpleRFR <root> <case1>

and I can read data from the directory /<case1>/0/.
But in simpleRFR.C I call a function that should read from /<case2>/5/. How i can do this??
I read data in the following way:

// Get index of patch
label inletPatchID = mesh.boundaryMesh().findPatchID("movingWall");

// Get reference to boundary value
const fvPatchVectorField& faceCentreshub = mesh.Cf().boundaryField()[inletPatchID];
fvPatchVectorField& movingWallU = U.boundaryField()[inletPatchID];

thanks
Bye


All times are GMT -4. The time now is 01:46.