Commit a0517f0e authored by mattijs's avatar mattijs
Browse files

BUG: fan b.c. was using phi on slave side.

parent 4704d7fc
......@@ -171,6 +171,23 @@ tmp<Field<Type> > cyclicFvPatchField<Type>::patchNeighbourField() const
}
template<class Type>
const cyclicFvPatchField<Type>& cyclicFvPatchField<Type>::neighbourPatchField()
const
{
const GeometricField<Type, fvPatchField, volMesh>& fld =
static_cast<const GeometricField<Type, fvPatchField, volMesh>&>
(
this->internalField()
);
return refCast<const cyclicFvPatchField<Type> >
(
fld.boundaryField()[this->cyclicPatch().neighbPatchID()]
);
}
template<class Type>
void cyclicFvPatchField<Type>::updateInterfaceMatrix
(
......
......@@ -150,9 +150,12 @@ public:
// Evaluation functions
//- Return neighbour coupled given internal cell data
//- Return neighbour coupled internal cell data
tmp<Field<Type> > patchNeighbourField() const;
//- Return reference to neighbour patchField
const cyclicFvPatchField<Type>& neighbourPatchField() const;
//- Update result field based on interface functionality
virtual void updateInterfaceMatrix
(
......
......@@ -140,7 +140,17 @@ public:
//- Return the "jump" across the patch.
virtual tmp<Field<Type> > jump() const
{
return jump_;
if (this->cyclicPatch().owner())
{
return jump_;
}
else
{
return refCast<const fanFvPatchField<Type> >
(
this->neighbourPatchField()
).jump();
}
}
......
......@@ -15,47 +15,47 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 1 -1 0 0 0 0 ];
dimensions [0 1 -1 0 0 0 0];
internalField uniform ( 0 0 0 );
internalField uniform (0 0 0);
boundaryField
{
inlet
{
type pressureInletOutletVelocity;
value uniform ( 0 0 0 );
value uniform (0 0 0);
}
outlet1
{
type inletOutlet;
inletValue uniform ( 0 0 0 );
value uniform ( 0 0 0 );
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
outlet2
{
type inletOutlet;
inletValue uniform ( 0 0 0 );
value uniform ( 0 0 0 );
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
baffles
{
type fixedValue;
value uniform ( 0 0 0 );
value uniform (0 0 0);
}
fan_half0
{
type cyclic;
}
defaultFaces
{
type fixedValue;
value uniform ( 0 0 0 );
}
fan_half1
{
type cyclic;
}
defaultFaces
{
type fixedValue;
value uniform (0 0 0);
}
}
......
......@@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -3 0 0 0 0 ];
dimensions [0 2 -3 0 0 0 0];
internalField uniform 1;
......@@ -42,21 +42,27 @@ boundaryField
baffles
{
type epsilonWallFunction;
value uniform 1;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
fan_half0
{
type cyclic;
}
fan_half1
{
type cyclic;
}
defaultFaces
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 1;
}
fan_half1
{
type cyclic;
}
}
......
......@@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -2 0 0 0 0 ];
dimensions [0 2 -2 0 0 0 0];
internalField uniform 1;
......@@ -42,21 +42,21 @@ boundaryField
baffles
{
type kqRWallFunction;
value uniform 1;
value uniform 0;
}
fan_half0
{
type cyclic;
}
fan_half1
{
type cyclic;
}
defaultFaces
{
type kqRWallFunction;
value uniform 1;
}
fan_half1
{
type cyclic;
}
}
......
......@@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -1 0 0 0 0 ];
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
......@@ -41,14 +41,14 @@ boundaryField
{
type cyclic;
}
defaultFaces
{
type zeroGradient;
}
fan_half1
{
type cyclic;
}
defaultFaces
{
type zeroGradient;
}
}
......
......@@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -1 0 0 0 0 ];
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
......@@ -39,21 +39,27 @@ boundaryField
baffles
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
fan_half0
{
type cyclic;
}
fan_half1
{
type cyclic;
}
defaultFaces
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
fan_half1
{
type cyclic;
}
}
......
......@@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -2 0 0 0 0 ];
dimensions [0 2 -2 0 0 0 0];
internalField uniform 100000;
......@@ -24,14 +24,12 @@ boundaryField
inlet
{
type timeVaryingTotalPressure;
p0 100040;
outOfBounds clamp;
fileName "$FOAM_CASE/constant/p0vsTime";
U U;
phi phi;
rho none;
psi none;
gamma 1;
p0 100040;
fileName "$FOAM_CASE/constant/p0vsTime";
outOfBounds clamp;
value uniform 100040;
}
outlet1
......@@ -52,19 +50,19 @@ boundaryField
{
type fan;
patchType cyclic;
f 2 ( 50 -0.1 );
value $internalField;
}
defaultFaces
{
type zeroGradient;
f 2(100 -0.1);
value uniform 0;
}
fan_half1
{
type fan;
patchType cyclic;
f 2 ( 50 -0.1 );
value $internalField;
f 2(100 -0.1);
value uniform 0;
}
defaultFaces
{
type zeroGradient;
}
}
......
......@@ -28,7 +28,6 @@ endTime 1;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.1;
purgeWrite 0;
......@@ -47,7 +46,7 @@ runTimeModifiable true;
adjustTimeStep yes;
maxCo 5;
maxCo 3;
libs
(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment