ENH: re-worked temperature/energy jumps

This commit is contained in:
andy
2012-10-24 15:52:56 +01:00
parent 33086285d3
commit f582fab6dd
3 changed files with 15 additions and 10 deletions

View File

@ -77,7 +77,6 @@ Foam::energyJumpFvPatchScalarField::energyJumpFvPatchScalarField
const energyJumpFvPatchScalarField& ptf
)
:
cyclicLduInterfaceField(),
fixedJumpFvPatchField<scalar>(ptf)
{}
@ -115,16 +114,9 @@ void Foam::energyJumpFvPatchScalarField::updateCoeffs()
thermo.T().boundaryField()[patchID]
);
const scalar time = this->db().time().value();
const scalarField jumpTb
(
patch().size(),
TbPatch.jumpTable().value(time)
);
const labelUList& faceCells = this->patch().faceCells();
jump_ = thermo.he(pp, jumpTb, faceCells);
jump_ = thermo.he(pp, TbPatch.jump(), faceCells);
}
fixedJumpFvPatchField<scalar>::updateCoeffs();

View File

@ -84,7 +84,6 @@ Foam::temperatureJumpFvPatchScalarField::temperatureJumpFvPatchScalarField
const temperatureJumpFvPatchScalarField& ptf
)
:
cyclicLduInterfaceField(),
fixedJumpFvPatchField<scalar>(ptf),
jumpTable_(ptf.jumpTable_().clone().ptr())
{}
@ -103,6 +102,17 @@ Foam::temperatureJumpFvPatchScalarField::temperatureJumpFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField>
Foam::temperatureJumpFvPatchScalarField::jump() const
{
const scalar time = this->db().time().value();
tmp<scalarField> tj(new scalarField(this->size(), jumpTable_->value(time)));
return tj;
}
void Foam::temperatureJumpFvPatchScalarField::write(Ostream& os) const
{
fixedJumpFvPatchField<scalar>::write(os);

View File

@ -166,6 +166,9 @@ public:
// Access functions
//- Return a field of the temperature jump
virtual tmp<scalarField> jump() const;
//- Return jumpTable
const DataEntry<scalar>& jumpTable() const
{