mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
This commit is contained in:
@ -123,6 +123,32 @@ angularOscillatingDisplacementPointPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void angularOscillatingDisplacementPointPatchVectorField::autoMap
|
||||||
|
(
|
||||||
|
const pointPatchFieldMapper& m
|
||||||
|
)
|
||||||
|
{
|
||||||
|
fixedValuePointPatchField<vector>::autoMap(m);
|
||||||
|
|
||||||
|
p0_.autoMap(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void angularOscillatingDisplacementPointPatchVectorField::rmap
|
||||||
|
(
|
||||||
|
const pointPatchField<vector>& ptf,
|
||||||
|
const labelList& addr
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const angularOscillatingDisplacementPointPatchVectorField& aODptf =
|
||||||
|
refCast<const angularOscillatingDisplacementPointPatchVectorField>(ptf);
|
||||||
|
|
||||||
|
fixedValuePointPatchField<vector>::rmap(aODptf, addr);
|
||||||
|
|
||||||
|
p0_.rmap(aODptf.p0_, addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void angularOscillatingDisplacementPointPatchVectorField::updateCoeffs()
|
void angularOscillatingDisplacementPointPatchVectorField::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
|
|||||||
@ -132,6 +132,22 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
// Mapping functions
|
||||||
|
|
||||||
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
|
virtual void autoMap
|
||||||
|
(
|
||||||
|
const pointPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Reverse map the given pointPatchField onto this pointPatchField
|
||||||
|
virtual void rmap
|
||||||
|
(
|
||||||
|
const pointPatchField<vector>&,
|
||||||
|
const labelList&
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
|
|||||||
@ -123,6 +123,32 @@ angularOscillatingVelocityPointPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void angularOscillatingVelocityPointPatchVectorField::autoMap
|
||||||
|
(
|
||||||
|
const pointPatchFieldMapper& m
|
||||||
|
)
|
||||||
|
{
|
||||||
|
fixedValuePointPatchField<vector>::autoMap(m);
|
||||||
|
|
||||||
|
p0_.autoMap(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void angularOscillatingVelocityPointPatchVectorField::rmap
|
||||||
|
(
|
||||||
|
const pointPatchField<vector>& ptf,
|
||||||
|
const labelList& addr
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const angularOscillatingVelocityPointPatchVectorField& aOVptf =
|
||||||
|
refCast<const angularOscillatingVelocityPointPatchVectorField>(ptf);
|
||||||
|
|
||||||
|
fixedValuePointPatchField<vector>::rmap(aOVptf, addr);
|
||||||
|
|
||||||
|
p0_.rmap(aOVptf.p0_, addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void angularOscillatingVelocityPointPatchVectorField::updateCoeffs()
|
void angularOscillatingVelocityPointPatchVectorField::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
|
|||||||
@ -132,6 +132,22 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
// Mapping functions
|
||||||
|
|
||||||
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
|
virtual void autoMap
|
||||||
|
(
|
||||||
|
const pointPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Reverse map the given pointPatchField onto this pointPatchField
|
||||||
|
virtual void rmap
|
||||||
|
(
|
||||||
|
const pointPatchField<vector>&,
|
||||||
|
const labelList&
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
|
|||||||
@ -111,6 +111,32 @@ oscillatingVelocityPointPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void oscillatingVelocityPointPatchVectorField::autoMap
|
||||||
|
(
|
||||||
|
const pointPatchFieldMapper& m
|
||||||
|
)
|
||||||
|
{
|
||||||
|
fixedValuePointPatchField<vector>::autoMap(m);
|
||||||
|
|
||||||
|
p0_.autoMap(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void oscillatingVelocityPointPatchVectorField::rmap
|
||||||
|
(
|
||||||
|
const pointPatchField<vector>& ptf,
|
||||||
|
const labelList& addr
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const oscillatingVelocityPointPatchVectorField& oVptf =
|
||||||
|
refCast<const oscillatingVelocityPointPatchVectorField>(ptf);
|
||||||
|
|
||||||
|
fixedValuePointPatchField<vector>::rmap(oVptf, addr);
|
||||||
|
|
||||||
|
p0_.rmap(oVptf.p0_, addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void oscillatingVelocityPointPatchVectorField::updateCoeffs()
|
void oscillatingVelocityPointPatchVectorField::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
|
|||||||
@ -129,6 +129,22 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
// Mapping functions
|
||||||
|
|
||||||
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
|
virtual void autoMap
|
||||||
|
(
|
||||||
|
const pointPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Reverse map the given pointPatchField onto this pointPatchField
|
||||||
|
virtual void rmap
|
||||||
|
(
|
||||||
|
const pointPatchField<vector>&,
|
||||||
|
const labelList&
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
|
|||||||
@ -48,7 +48,7 @@ uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValuePointPatchField<vector>(p, iF),
|
fixedValuePointPatchField<vector>(p, iF),
|
||||||
motion_(),
|
motion_(),
|
||||||
p0_(p.localPoints()),
|
initialPoints_(p.localPoints()),
|
||||||
rhoInf_(1.0)
|
rhoInf_(1.0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -70,13 +70,13 @@ uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField
|
|||||||
updateCoeffs();
|
updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dict.found("p0"))
|
if (dict.found("initialPoints"))
|
||||||
{
|
{
|
||||||
p0_ = vectorField("p0", dict , p.size());
|
initialPoints_ = vectorField("initialPoints", dict , p.size());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
p0_ = p.localPoints();
|
initialPoints_ = p.localPoints();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValuePointPatchField<vector>(ptf, p, iF, mapper),
|
fixedValuePointPatchField<vector>(ptf, p, iF, mapper),
|
||||||
motion_(ptf.motion_),
|
motion_(ptf.motion_),
|
||||||
p0_(ptf.p0_, mapper),
|
initialPoints_(ptf.initialPoints_, mapper),
|
||||||
rhoInf_(ptf.rhoInf_)
|
rhoInf_(ptf.rhoInf_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -106,13 +106,42 @@ uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField
|
|||||||
:
|
:
|
||||||
fixedValuePointPatchField<vector>(ptf, iF),
|
fixedValuePointPatchField<vector>(ptf, iF),
|
||||||
motion_(ptf.motion_),
|
motion_(ptf.motion_),
|
||||||
p0_(ptf.p0_),
|
initialPoints_(ptf.initialPoints_),
|
||||||
rhoInf_(ptf.rhoInf_)
|
rhoInf_(ptf.rhoInf_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::autoMap
|
||||||
|
(
|
||||||
|
const pointPatchFieldMapper& m
|
||||||
|
)
|
||||||
|
{
|
||||||
|
fixedValuePointPatchField<vector>::autoMap(m);
|
||||||
|
|
||||||
|
initialPoints_.autoMap(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::rmap
|
||||||
|
(
|
||||||
|
const pointPatchField<vector>& ptf,
|
||||||
|
const labelList& addr
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField& uSDoFptf =
|
||||||
|
refCast
|
||||||
|
<
|
||||||
|
const uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
|
>(ptf);
|
||||||
|
|
||||||
|
fixedValuePointPatchField<vector>::rmap(uSDoFptf, addr);
|
||||||
|
|
||||||
|
initialPoints_.rmap(uSDoFptf.initialPoints_, addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
@ -138,7 +167,10 @@ void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
|||||||
// Do not modify the accelerations, except with gravity, where available
|
// Do not modify the accelerations, except with gravity, where available
|
||||||
motion_.updateForce(gravity*motion_.mass(), vector::zero, t.deltaTValue());
|
motion_.updateForce(gravity*motion_.mass(), vector::zero, t.deltaTValue());
|
||||||
|
|
||||||
Field<vector>::operator=(motion_.currentPosition(p0_) - p0_);
|
Field<vector>::operator=
|
||||||
|
(
|
||||||
|
motion_.currentPosition(initialPoints_) - initialPoints_
|
||||||
|
);
|
||||||
|
|
||||||
fixedValuePointPatchField<vector>::updateCoeffs();
|
fixedValuePointPatchField<vector>::updateCoeffs();
|
||||||
}
|
}
|
||||||
@ -153,7 +185,7 @@ void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::write
|
|||||||
motion_.write(os);
|
motion_.write(os);
|
||||||
os.writeKeyword("rhoInf")
|
os.writeKeyword("rhoInf")
|
||||||
<< rhoInf_ << token::END_STATEMENT << nl;
|
<< rhoInf_ << token::END_STATEMENT << nl;
|
||||||
p0_.writeEntry("p0", os);
|
initialPoints_.writeEntry("initialPoints", os);
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,8 +57,8 @@ class uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField
|
|||||||
//- Six dof motion object
|
//- Six dof motion object
|
||||||
sixDoFRigidBodyMotion motion_;
|
sixDoFRigidBodyMotion motion_;
|
||||||
|
|
||||||
//- Reference positions of points on the patch
|
//- Initial positions of points on the patch
|
||||||
pointField p0_;
|
pointField initialPoints_;
|
||||||
|
|
||||||
//- Reference density required by the forces object for
|
//- Reference density required by the forces object for
|
||||||
// incompressible calculations. Retained here to give
|
// incompressible calculations. Retained here to give
|
||||||
@ -136,6 +136,22 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
// Mapping functions
|
||||||
|
|
||||||
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
|
virtual void autoMap
|
||||||
|
(
|
||||||
|
const pointPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Reverse map the given pointPatchField onto this pointPatchField
|
||||||
|
virtual void rmap
|
||||||
|
(
|
||||||
|
const pointPatchField<vector>&,
|
||||||
|
const labelList&
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
|
|||||||
Reference in New Issue
Block a user