Bugfix: clean-up of total boundary conditions

This commit is contained in:
Hrvoje Jasak 2015-11-15 15:00:58 +00:00
parent dca56bd871
commit 240cc6c244
8 changed files with 110 additions and 77 deletions

View file

@ -264,29 +264,6 @@ Foam::totalPressureFvPatchScalarField::snGrad() const
} }
Foam::tmp<Foam::scalarField>
Foam::totalPressureFvPatchScalarField::valueInternalCoeffs
(
const tmp<scalarField>&
) const
{
return tmp<scalarField>
(
new scalarField(this->size(), 0.0)
);
}
Foam::tmp<Foam::scalarField>
Foam::totalPressureFvPatchScalarField::valueBoundaryCoeffs
(
const tmp<scalarField>&
) const
{
return *this;
}
Foam::tmp<Foam::scalarField> Foam::tmp<Foam::scalarField>
Foam::totalPressureFvPatchScalarField::gradientInternalCoeffs() const Foam::totalPressureFvPatchScalarField::gradientInternalCoeffs() const
{ {

View file

@ -25,7 +25,8 @@ Class
Foam::totalPressureFvPatchScalarField Foam::totalPressureFvPatchScalarField
Description Description
Foam::totalPressureFvPatchScalarField Total pressure boundary condition. The snGrad is set to zero to stop
back-diffusion
SourceFiles SourceFiles
totalPressureFvPatchScalarField.C totalPressureFvPatchScalarField.C
@ -207,31 +208,20 @@ public:
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();
//- Return patch-normal gradient //- Return patch-normal gradient: set to zero
virtual tmp<scalarField> snGrad() const; virtual tmp<scalarField> snGrad() const;
//- Return the matrix diagonal coefficients corresponding to the
// evaluation of the value of this patchField with given weights
virtual tmp<scalarField> valueInternalCoeffs
(
const tmp<scalarField>&
) const;
//- Return the matrix source coefficients corresponding to the
// evaluation of the value of this patchField with given weights
virtual tmp<scalarField> valueBoundaryCoeffs
(
const tmp<scalarField>&
) const;
//- Return the matrix diagonal coefficients corresponding to the //- Return the matrix diagonal coefficients corresponding to the
// evaluation of the gradient of this patchField // evaluation of the gradient of this patchField
// Removed gradient contribution
virtual tmp<scalarField> gradientInternalCoeffs() const; virtual tmp<scalarField> gradientInternalCoeffs() const;
//- Return the matrix source coefficients corresponding to the //- Return the matrix source coefficients corresponding to the
// evaluation of the gradient of this patchField // evaluation of the gradient of this patchField
// Removed gradient contribution
virtual tmp<scalarField> gradientBoundaryCoeffs() const; virtual tmp<scalarField> gradientBoundaryCoeffs() const;
//- Write //- Write
virtual void write(Ostream&) const; virtual void write(Ostream&) const;
}; };

View file

@ -174,6 +174,36 @@ void Foam::totalTemperatureFvPatchScalarField::updateCoeffs()
} }
Foam::tmp<Foam::scalarField>
Foam::totalTemperatureFvPatchScalarField::snGrad() const
{
return tmp<scalarField>
(
new scalarField(this->size(), 0.0)
);
}
Foam::tmp<Foam::scalarField>
Foam::totalTemperatureFvPatchScalarField::gradientInternalCoeffs() const
{
return tmp<scalarField>
(
new scalarField(this->size(), 0.0)
);
}
Foam::tmp<Foam::scalarField>
Foam::totalTemperatureFvPatchScalarField::gradientBoundaryCoeffs() const
{
return tmp<scalarField>
(
new scalarField(this->size(), 0.0)
);
}
void Foam::totalTemperatureFvPatchScalarField::write(Ostream& os) const void Foam::totalTemperatureFvPatchScalarField::write(Ostream& os) const
{ {
fvPatchScalarField::write(os); fvPatchScalarField::write(os);

View file

@ -25,7 +25,8 @@ Class
Foam::totalTemperatureFvPatchScalarField Foam::totalTemperatureFvPatchScalarField
Description Description
Foam::totalTemperatureFvPatchScalarField Total temperature boundary condition. The snGrad is set to zero to stop
back-diffusion
SourceFiles SourceFiles
totalTemperatureFvPatchScalarField.C totalTemperatureFvPatchScalarField.C
@ -180,6 +181,18 @@ public:
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();
//- Return patch-normal gradient: set to zero
virtual tmp<scalarField> snGrad() const;
//- Return the matrix diagonal coefficients corresponding to the
// evaluation of the gradient of this patchField
// Removed gradient contribution
virtual tmp<scalarField> gradientInternalCoeffs() const;
//- Return the matrix source coefficients corresponding to the
// evaluation of the gradient of this patchField
virtual tmp<scalarField> gradientBoundaryCoeffs() const;
//- Write //- Write
virtual void write(Ostream&) const; virtual void write(Ostream&) const;

View file

@ -194,29 +194,6 @@ Foam::isentropicTotalPressureFvPatchScalarField::snGrad() const
} }
Foam::tmp<Foam::scalarField>
Foam::isentropicTotalPressureFvPatchScalarField::valueInternalCoeffs
(
const tmp<scalarField>&
) const
{
return tmp<scalarField>
(
new scalarField(this->size(), 0.0)
);
}
Foam::tmp<Foam::scalarField>
Foam::isentropicTotalPressureFvPatchScalarField::valueBoundaryCoeffs
(
const tmp<scalarField>&
) const
{
return *this;
}
Foam::tmp<Foam::scalarField> Foam::tmp<Foam::scalarField>
Foam::isentropicTotalPressureFvPatchScalarField::gradientInternalCoeffs() const Foam::isentropicTotalPressureFvPatchScalarField::gradientInternalCoeffs() const
{ {

View file

@ -25,7 +25,8 @@ Class
Foam::isentropicTotalPressureFvPatchScalarField Foam::isentropicTotalPressureFvPatchScalarField
Description Description
Foam::isentropicTotalPressureFvPatchScalarField Isentropic total pressure boundary condition. The snGrad is set to
zero to stop back-diffusion
SourceFiles SourceFiles
isentropicTotalPressureFvPatchScalarField.C isentropicTotalPressureFvPatchScalarField.C
@ -147,18 +148,6 @@ public:
return UName_; return UName_;
} }
//- Return the heat capacity ratio
scalar gamma() const
{
return gamma_;
}
//- Return reference to the heat capacity ratio to allow adjustment
scalar& gamma()
{
return gamma_;
}
//- Return the total pressure //- Return the total pressure
const scalarField& p0() const const scalarField& p0() const
{ {
@ -197,6 +186,18 @@ public:
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();
//- Return patch-normal gradient: set to zero
virtual tmp<scalarField> snGrad() const;
//- Return the matrix diagonal coefficients corresponding to the
// evaluation of the gradient of this patchField
// Removed gradient contribution
virtual tmp<scalarField> gradientInternalCoeffs() const;
//- Return the matrix source coefficients corresponding to the
// evaluation of the gradient of this patchField
virtual tmp<scalarField> gradientBoundaryCoeffs() const;
//- Write //- Write
virtual void write(Ostream&) const; virtual void write(Ostream&) const;

View file

@ -174,6 +174,38 @@ void Foam::isentropicTotalTemperatureFvPatchScalarField::updateCoeffs
} }
Foam::tmp<Foam::scalarField>
Foam::isentropicTotalTemperatureFvPatchScalarField::snGrad() const
{
return tmp<scalarField>
(
new scalarField(this->size(), 0.0)
);
}
Foam::tmp<Foam::scalarField>
Foam::isentropicTotalTemperatureFvPatchScalarField::
gradientInternalCoeffs() const
{
return tmp<scalarField>
(
new scalarField(this->size(), 0.0)
);
}
Foam::tmp<Foam::scalarField>
Foam::isentropicTotalTemperatureFvPatchScalarField::
gradientBoundaryCoeffs() const
{
return tmp<scalarField>
(
new scalarField(this->size(), 0.0)
);
}
void Foam::isentropicTotalTemperatureFvPatchScalarField::write void Foam::isentropicTotalTemperatureFvPatchScalarField::write
( (
Ostream& os Ostream& os

View file

@ -25,7 +25,8 @@ Class
Foam::isentropicTotalTemperatureFvPatchScalarField Foam::isentropicTotalTemperatureFvPatchScalarField
Description Description
Foam::isentropicTotalTemperatureFvPatchScalarField Isentropic total temperature boundary condition. The snGrad is set to
zero to stop back-diffusion
SourceFiles SourceFiles
isentropicTotalTemperatureFvPatchScalarField.C isentropicTotalTemperatureFvPatchScalarField.C
@ -169,6 +170,18 @@ public:
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();
//- Return patch-normal gradient: set to zero
virtual tmp<scalarField> snGrad() const;
//- Return the matrix diagonal coefficients corresponding to the
// evaluation of the gradient of this patchField
// Removed gradient contribution
virtual tmp<scalarField> gradientInternalCoeffs() const;
//- Return the matrix source coefficients corresponding to the
// evaluation of the gradient of this patchField
virtual tmp<scalarField> gradientBoundaryCoeffs() const;
//- Write //- Write
virtual void write(Ostream&) const; virtual void write(Ostream&) const;