non-uniform boundray condition - solution dynamicCode
Posted October 25, 2016 at 05:12 by kindle
Updated October 25, 2016 at 05:14 by kindle (::pow give a smile face)
Updated October 25, 2016 at 05:14 by kindle (::pow give a smile face)
Modifying the file 0/U the /incompressible/icoFoam/cavity tutorial.
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
movingWall
{
type codedFixedValue;
value $internalField;
redirectType ramp;
code
#{
scalar U_0=0.049954; //mean U.This isn't the max velocity of the profile.
scalar r=0.05; //mean Radius. in the 3 pipes radius are different.
fixedValueFvPatchVectorField myPatch(*this);
forAll(this->patch().Cf(),i)
{
myPatch[i]=vector(2*U_0*(1-Foam :: pow(this->patch().Cf()[i].x()-0.05,2)/Foam :: pow(r,2)),0,0);
}
operator==(myPatch);
#};
}
fixedWalls
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
then icoFoam ...
boundary condition is then calculated at 0 and duplicated at other time steps.
May need
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
movingWall
{
type codedFixedValue;
value $internalField;
redirectType ramp;
code
#{
scalar U_0=0.049954; //mean U.This isn't the max velocity of the profile.
scalar r=0.05; //mean Radius. in the 3 pipes radius are different.
fixedValueFvPatchVectorField myPatch(*this);
forAll(this->patch().Cf(),i)
{
myPatch[i]=vector(2*U_0*(1-Foam :: pow(this->patch().Cf()[i].x()-0.05,2)/Foam :: pow(r,2)),0,0);
}
operator==(myPatch);
#};
}
fixedWalls
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
then icoFoam ...
boundary condition is then calculated at 0 and duplicated at other time steps.
May need
Quote:
Hey Elisa
You need to enable the 'allowSystemOperations' switch if you want to use codestream. You should find this in the /etc/controlDict file as the error log suggests. It'll be in the InfoSwitches block. Just make it '1'.
Try this and let me know if it's working.
Cheers!
Akshay
You need to enable the 'allowSystemOperations' switch if you want to use codestream. You should find this in the /etc/controlDict file as the error log suggests. It'll be in the InfoSwitches block. Just make it '1'.
Try this and let me know if it's working.
Cheers!
Akshay
Total Comments 0