mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Adding more useful information to sixDoFRigidBodyMotion restraint
reporting. Making sixDoFRigidBodyMotionConstraints less verbose by default, now requires debug switch to be set.
This commit is contained in:
@ -726,6 +726,7 @@ DebugSwitches
|
|||||||
shapeList 0;
|
shapeList 0;
|
||||||
shapeToCell 0;
|
shapeToCell 0;
|
||||||
simple 0;
|
simple 0;
|
||||||
|
sixDoFRigidBodyMotionConstraint 0;
|
||||||
skewCorrected 0;
|
skewCorrected 0;
|
||||||
skewCorrectionVectors 0;
|
skewCorrectionVectors 0;
|
||||||
sliced 0;
|
sliced 0;
|
||||||
|
|||||||
@ -248,10 +248,13 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::write(Ostream& os) const
|
|||||||
{
|
{
|
||||||
pointPatchField<vector>::write(os);
|
pointPatchField<vector>::write(os);
|
||||||
|
|
||||||
os.writeKeyword("rhoInf") << rhoInf_ << token::END_STATEMENT << nl;
|
|
||||||
|
|
||||||
os.writeKeyword("rhoName") << rhoName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("rhoName") << rhoName_ << token::END_STATEMENT << nl;
|
||||||
|
|
||||||
|
if (rhoName_ == "rhoInf")
|
||||||
|
{
|
||||||
|
os.writeKeyword("rhoInf") << rhoInf_ << token::END_STATEMENT << nl;
|
||||||
|
}
|
||||||
|
|
||||||
if (lookupGravity_ == 0 || lookupGravity_ == -2)
|
if (lookupGravity_ == 0 || lookupGravity_ == -2)
|
||||||
{
|
{
|
||||||
os.writeKeyword("g") << g_ << token::END_STATEMENT << nl;
|
os.writeKeyword("g") << g_ << token::END_STATEMENT << nl;
|
||||||
|
|||||||
@ -40,7 +40,7 @@ void Foam::sixDoFRigidBodyMotion::applyRestraints()
|
|||||||
{
|
{
|
||||||
if (report_)
|
if (report_)
|
||||||
{
|
{
|
||||||
Info<< "Restraint " << restraintNames_[rI];
|
Info<< "Restraint " << restraintNames_[rI] << ": ";
|
||||||
}
|
}
|
||||||
|
|
||||||
// restraint position
|
// restraint position
|
||||||
@ -89,9 +89,9 @@ void Foam::sixDoFRigidBodyMotion::applyConstraints(scalar deltaT)
|
|||||||
|
|
||||||
forAll(constraints_, cI)
|
forAll(constraints_, cI)
|
||||||
{
|
{
|
||||||
if (report_)
|
if (sixDoFRigidBodyMotionConstraint::debug)
|
||||||
{
|
{
|
||||||
Info<< "Constraint " << constraintNames_[cI];
|
Info<< "Constraint " << constraintNames_[cI] << ": ";
|
||||||
}
|
}
|
||||||
|
|
||||||
// constraint position
|
// constraint position
|
||||||
|
|||||||
@ -121,7 +121,7 @@ bool Foam::sixDoFRigidBodyMotionConstraints::fixedAxis::constrain
|
|||||||
|
|
||||||
bool converged(mag(theta) < tolerance_);
|
bool converged(mag(theta) < tolerance_);
|
||||||
|
|
||||||
if (motion.report())
|
if (sixDoFRigidBodyMotionConstraint::debug)
|
||||||
{
|
{
|
||||||
Info<< " angle " << theta
|
Info<< " angle " << theta
|
||||||
<< " force " << constraintForceIncrement
|
<< " force " << constraintForceIncrement
|
||||||
|
|||||||
@ -107,7 +107,7 @@ bool Foam::sixDoFRigidBodyMotionConstraints::fixedLine::constrain
|
|||||||
|
|
||||||
bool converged(mag(error) < tolerance_);
|
bool converged(mag(error) < tolerance_);
|
||||||
|
|
||||||
if (motion.report())
|
if (sixDoFRigidBodyMotionConstraint::debug)
|
||||||
{
|
{
|
||||||
Info<< " error " << error
|
Info<< " error " << error
|
||||||
<< " force " << constraintForceIncrement
|
<< " force " << constraintForceIncrement
|
||||||
|
|||||||
@ -143,7 +143,7 @@ bool Foam::sixDoFRigidBodyMotionConstraints::fixedOrientation::constrain
|
|||||||
|
|
||||||
bool converged(mag(maxTheta) < tolerance_);
|
bool converged(mag(maxTheta) < tolerance_);
|
||||||
|
|
||||||
if (motion.report())
|
if (sixDoFRigidBodyMotionConstraint::debug)
|
||||||
{
|
{
|
||||||
Info<< " max angle " << maxTheta
|
Info<< " max angle " << maxTheta
|
||||||
<< " force " << constraintForceIncrement
|
<< " force " << constraintForceIncrement
|
||||||
|
|||||||
@ -107,7 +107,7 @@ bool Foam::sixDoFRigidBodyMotionConstraints::fixedPlane::constrain
|
|||||||
|
|
||||||
bool converged(mag(error) < tolerance_);
|
bool converged(mag(error) < tolerance_);
|
||||||
|
|
||||||
if (motion.report())
|
if (sixDoFRigidBodyMotionConstraint::debug)
|
||||||
{
|
{
|
||||||
Info<< " error " << error
|
Info<< " error " << error
|
||||||
<< " force " << constraintForceIncrement
|
<< " force " << constraintForceIncrement
|
||||||
|
|||||||
@ -116,7 +116,7 @@ bool Foam::sixDoFRigidBodyMotionConstraints::fixedPoint::constrain
|
|||||||
|
|
||||||
bool converged(mag(error) < tolerance_);
|
bool converged(mag(error) < tolerance_);
|
||||||
|
|
||||||
if (motion.report())
|
if (sixDoFRigidBodyMotionConstraint::debug)
|
||||||
{
|
{
|
||||||
Info<< " error " << error
|
Info<< " error " << error
|
||||||
<< " force " << constraintForceIncrement
|
<< " force " << constraintForceIncrement
|
||||||
|
|||||||
@ -136,7 +136,7 @@ Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::restrain
|
|||||||
|
|
||||||
if (motion.report())
|
if (motion.report())
|
||||||
{
|
{
|
||||||
Info<< " angle " << theta
|
Info<< " angle " << theta*sign(a & axis_)
|
||||||
<< " force " << restraintForce
|
<< " force " << restraintForce
|
||||||
<< " moment " << restraintMoment
|
<< " moment " << restraintMoment
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|||||||
@ -96,7 +96,8 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearSpring::restrain
|
|||||||
|
|
||||||
if (motion.report())
|
if (motion.report())
|
||||||
{
|
{
|
||||||
Info<< " spring length " << magR
|
Info<< " attachmentPt - anchor " << r
|
||||||
|
<< " spring length " << magR
|
||||||
<< " force " << restraintForce
|
<< " force " << restraintForce
|
||||||
<< " moment " << restraintMoment
|
<< " moment " << restraintMoment
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|||||||
@ -37,7 +37,6 @@ boundaryField
|
|||||||
centreOfMass (0.5 0.5 0.5);
|
centreOfMass (0.5 0.5 0.5);
|
||||||
momentOfInertia (0.08622222 0.08622222 0.144);
|
momentOfInertia (0.08622222 0.08622222 0.144);
|
||||||
mass 9.6;
|
mass 9.6;
|
||||||
rhoInf 1;
|
|
||||||
report on;
|
report on;
|
||||||
value uniform (0 0 0);
|
value uniform (0 0 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user