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

This commit is contained in:
mattijs
2010-10-21 18:38:58 +01:00
parent 4704d7fccd
commit a0517f0ea9
10 changed files with 93 additions and 54 deletions

View File

@ -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
(

View File

@ -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
(

View File

@ -139,9 +139,19 @@ public:
//- Return the "jump" across the patch.
virtual tmp<Field<Type> > jump() const
{
if (this->cyclicPatch().owner())
{
return jump_;
}
else
{
return refCast<const fanFvPatchField<Type> >
(
this->neighbourPatchField()
).jump();
}
}
// Mapping functions

View File

@ -47,15 +47,15 @@ boundaryField
{
type cyclic;
}
fan_half1
{
type cyclic;
}
defaultFaces
{
type fixedValue;
value uniform (0 0 0);
}
fan_half1
{
type cyclic;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -41,14 +41,14 @@ boundaryField
{
type cyclic;
}
defaultFaces
{
type zeroGradient;
}
fan_half1
{
type cyclic;
}
defaultFaces
{
type zeroGradient;
}
}

View File

@ -39,21 +39,27 @@ boundaryField
baffles
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
fan_half0
{
type cyclic;
}
defaultFaces
{
type nutkWallFunction;
value uniform 0;
}
fan_half1
{
type cyclic;
}
defaultFaces
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
}

View File

@ -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;
}
}

View File

@ -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
(