CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   setFieldsDict (https://www.cfd-online.com/Forums/openfoam-pre-processing/162695-setfieldsdict.html)

LVega November 15, 2015 18:27

setFieldsDict
 
Hi,

I want to assign in a square pipe a variable, B, that is 15 between the meters 1 and 4 and 0 in the rest of the pipe. I did as follows:

setFieldsDict

defaultFieldValues
(
volScalarFieldValue B 0
);

regions
(
boxToCell
{
box (1 0 0) (4 1 1);
fieldValues
(
volScalarFieldValue B 15
);
}
);

B

internalField uniform 0;

boundaryField
{
Inlet
{
type zeroGradient;
}
Outlet
{
type zeroGradient;
}

WallsA
{
type zeroGradient;
}

WallsB
{
type zeroGradient;
}

}

The value of B is 0 in all the pipe.

Can anyone tell me what did I do wrong?


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