Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
commit
07418fe086
@ -51,7 +51,7 @@ Foam::AverageIOField<Type>::AverageIOField
|
|||||||
:
|
:
|
||||||
regIOobject(io),
|
regIOobject(io),
|
||||||
Field<Type>(size),
|
Field<Type>(size),
|
||||||
average_(0)
|
average_(pTraits<Type>::zero)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,13 +45,6 @@ void Foam::sixDoFRigidBodyMotion::applyRestraints()
|
|||||||
|
|
||||||
restraints_[rI].restrain(*this, rP, rF, rM);
|
restraints_[rI].restrain(*this, rP, rF, rM);
|
||||||
|
|
||||||
if (report_)
|
|
||||||
{
|
|
||||||
Info<< "Restraint " << restraints_[rI].name() << ": "
|
|
||||||
<< "force " << rF << " moment " << rM
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
a() += rF/mass_;
|
a() += rF/mass_;
|
||||||
|
|
||||||
// Moments are returned in global axes, transforming to
|
// Moments are returned in global axes, transforming to
|
||||||
@ -104,23 +97,6 @@ void Foam::sixDoFRigidBodyMotion::applyConstraints(scalar deltaT)
|
|||||||
|
|
||||||
allConverged = allConverged && constraintConverged;
|
allConverged = allConverged && constraintConverged;
|
||||||
|
|
||||||
if (report_)
|
|
||||||
{
|
|
||||||
Info<< "Constraint " << constraints_[cI].name()
|
|
||||||
<< ": force " << cF << " moment " << cM;
|
|
||||||
|
|
||||||
if (constraintConverged)
|
|
||||||
{
|
|
||||||
Info<< " - converged";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Info<< " - not converged";
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accumulate constraint force
|
// Accumulate constraint force
|
||||||
cFA += cF;
|
cFA += cF;
|
||||||
|
|
||||||
|
@ -119,7 +119,28 @@ bool Foam::sixDoFRigidBodyMotionConstraints::fixedAxis::constrain
|
|||||||
|
|
||||||
constraintForceIncrement = vector::zero;
|
constraintForceIncrement = vector::zero;
|
||||||
|
|
||||||
return (mag(theta) < tolerance_);
|
bool converged(mag(theta) < tolerance_);
|
||||||
|
|
||||||
|
if (motion.report())
|
||||||
|
{
|
||||||
|
Info<< "Constraint " << this->name()
|
||||||
|
<< " angle " << theta
|
||||||
|
<< " force " << constraintForceIncrement
|
||||||
|
<< " moment " << constraintMomentIncrement;
|
||||||
|
|
||||||
|
if (converged)
|
||||||
|
{
|
||||||
|
Info<< " converged";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< " not converged";
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return converged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,7 +105,28 @@ bool Foam::sixDoFRigidBodyMotionConstraints::fixedLine::constrain
|
|||||||
|
|
||||||
constraintMomentIncrement = vector::zero;
|
constraintMomentIncrement = vector::zero;
|
||||||
|
|
||||||
return (mag(error) < tolerance_);
|
bool converged(mag(error) < tolerance_);
|
||||||
|
|
||||||
|
if (motion.report())
|
||||||
|
{
|
||||||
|
Info<< "Constraint " << this->name()
|
||||||
|
<< " error << " << error
|
||||||
|
<< " force " << constraintForceIncrement
|
||||||
|
<< " moment " << constraintMomentIncrement;
|
||||||
|
|
||||||
|
if (converged)
|
||||||
|
{
|
||||||
|
Info<< " converged";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< " not converged";
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return converged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -146,7 +146,28 @@ bool Foam::sixDoFRigidBodyMotionConstraints::fixedOrientation::constrain
|
|||||||
|
|
||||||
constraintForceIncrement = vector::zero;
|
constraintForceIncrement = vector::zero;
|
||||||
|
|
||||||
return (mag(maxTheta) < tolerance_);
|
bool converged(mag(maxTheta) < tolerance_);
|
||||||
|
|
||||||
|
if (motion.report())
|
||||||
|
{
|
||||||
|
Info<< "Constraint " << this->name()
|
||||||
|
<< " max angle " << maxTheta
|
||||||
|
<< " force " << constraintForceIncrement
|
||||||
|
<< " moment " << constraintMomentIncrement;
|
||||||
|
|
||||||
|
if (converged)
|
||||||
|
{
|
||||||
|
Info<< " converged";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< " not converged";
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return converged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,7 +105,28 @@ bool Foam::sixDoFRigidBodyMotionConstraints::fixedPlane::constrain
|
|||||||
|
|
||||||
constraintMomentIncrement = vector::zero;
|
constraintMomentIncrement = vector::zero;
|
||||||
|
|
||||||
return (mag(error) < tolerance_);
|
bool converged(mag(error) < tolerance_);
|
||||||
|
|
||||||
|
if (motion.report())
|
||||||
|
{
|
||||||
|
Info<< "Constraint " << this->name()
|
||||||
|
<< " error " << error
|
||||||
|
<< " force " << constraintForceIncrement
|
||||||
|
<< " moment " << constraintMomentIncrement;
|
||||||
|
|
||||||
|
if (converged)
|
||||||
|
{
|
||||||
|
Info<< " converged";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< " not converged";
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return converged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,7 +114,28 @@ bool Foam::sixDoFRigidBodyMotionConstraints::fixedPoint::constrain
|
|||||||
|
|
||||||
constraintMomentIncrement = vector::zero;
|
constraintMomentIncrement = vector::zero;
|
||||||
|
|
||||||
return (mag(error) < tolerance_);
|
bool converged(mag(error) < tolerance_);
|
||||||
|
|
||||||
|
if (motion.report())
|
||||||
|
{
|
||||||
|
Info<< "Constraint " << this->name()
|
||||||
|
<< " error " << error
|
||||||
|
<< " force " << constraintForceIncrement
|
||||||
|
<< " moment " << constraintMomentIncrement;
|
||||||
|
|
||||||
|
if (converged)
|
||||||
|
{
|
||||||
|
Info<< " converged";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< " not converged";
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return converged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -133,6 +133,15 @@ Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::restrain
|
|||||||
// Not needed to be altered as restraintForce is zero, but set to
|
// Not needed to be altered as restraintForce is zero, but set to
|
||||||
// centreOfMass to be sure of no spurious moment
|
// centreOfMass to be sure of no spurious moment
|
||||||
restraintPosition = motion.centreOfMass();
|
restraintPosition = motion.centreOfMass();
|
||||||
|
|
||||||
|
if (motion.report())
|
||||||
|
{
|
||||||
|
Info<< "Restraint " << this->name()
|
||||||
|
<< " angle " << theta
|
||||||
|
<< " force " << restraintForce
|
||||||
|
<< " moment " << restraintMoment
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -93,6 +93,15 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearSpring::restrain
|
|||||||
restraintForce = -stiffness_*(magR - restLength_)*r - damping_*(r & v)*r;
|
restraintForce = -stiffness_*(magR - restLength_)*r - damping_*(r & v)*r;
|
||||||
|
|
||||||
restraintMoment = vector::zero;
|
restraintMoment = vector::zero;
|
||||||
|
|
||||||
|
if (motion.report())
|
||||||
|
{
|
||||||
|
Info<< "Restraint " << this->name()
|
||||||
|
<< " spring length " << magR
|
||||||
|
<< " force " << restraintForce
|
||||||
|
<< " moment " << restraintMoment
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,6 +110,14 @@ Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularSpring::restrain
|
|||||||
// Not needed to be altered as restraintForce is zero, but set to
|
// Not needed to be altered as restraintForce is zero, but set to
|
||||||
// centreOfMass to be sure of no spurious moment
|
// centreOfMass to be sure of no spurious moment
|
||||||
restraintPosition = motion.centreOfMass();
|
restraintPosition = motion.centreOfMass();
|
||||||
|
|
||||||
|
if (motion.report())
|
||||||
|
{
|
||||||
|
Info<< "Restraint " << this->name()
|
||||||
|
<< " force " << restraintForce
|
||||||
|
<< " moment " << restraintMoment
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -133,6 +133,15 @@ Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::restrain
|
|||||||
// Not needed to be altered as restraintForce is zero, but set to
|
// Not needed to be altered as restraintForce is zero, but set to
|
||||||
// centreOfMass to be sure of no spurious moment
|
// centreOfMass to be sure of no spurious moment
|
||||||
restraintPosition = motion.centreOfMass();
|
restraintPosition = motion.centreOfMass();
|
||||||
|
|
||||||
|
if (motion.report())
|
||||||
|
{
|
||||||
|
Info<< "Restraint " << this->name()
|
||||||
|
<< " angle " << theta
|
||||||
|
<< " force " << restraintForce
|
||||||
|
<< " moment " << restraintMoment
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,12 +29,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
Foam::graph Foam::kShellIntegration
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
graph kShellIntegration
|
|
||||||
(
|
(
|
||||||
const complexVectorField& Ek,
|
const complexVectorField& Ek,
|
||||||
const Kmesh& K
|
const Kmesh& K
|
||||||
@ -55,8 +50,8 @@ graph kShellIntegration
|
|||||||
|
|
||||||
// now scale this to get the energy in a box of side l0
|
// now scale this to get the energy in a box of side l0
|
||||||
|
|
||||||
scalar l0(K.sizeOfBox()[0]*(scalar(K.nn()[0])/(scalar(K.nn()[0]) - 1.0)));
|
scalar l0(K.sizeOfBox()[0]*(scalar(K.nn()[0])/(scalar(K.nn()[0])-1.0)));
|
||||||
scalar factor = pow3(l0/constant::mathematical::twoPi);
|
scalar factor = pow((l0/(2.0*constant::mathematical::pi)),3.0);
|
||||||
|
|
||||||
y *= factor;
|
y *= factor;
|
||||||
|
|
||||||
@ -72,7 +67,7 @@ graph kShellIntegration
|
|||||||
// kShellMean : average over the points in a k-shell to evaluate the
|
// kShellMean : average over the points in a k-shell to evaluate the
|
||||||
// radial part of the energy spectrum.
|
// radial part of the energy spectrum.
|
||||||
|
|
||||||
graph kShellMean
|
Foam::graph Foam::kShellMean
|
||||||
(
|
(
|
||||||
const complexVectorField& Ek,
|
const complexVectorField& Ek,
|
||||||
const Kmesh& K
|
const Kmesh& K
|
||||||
@ -136,13 +131,8 @@ graph kShellMean
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return graph("E(k)", "k", "E(k)", Ek1D, k1D);
|
return graph("E(k)", "k", "E(k)", k1D, Ek1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
@ -59,7 +59,6 @@ moleculeProperties
|
|||||||
mass 46.5e-27;
|
mass 46.5e-27;
|
||||||
diameter 4.17e-10;
|
diameter 4.17e-10;
|
||||||
internalDegreesOfFreedom 2;
|
internalDegreesOfFreedom 2;
|
||||||
viscosityCoefficient 1.656e-5;
|
|
||||||
omega 0.74;
|
omega 0.74;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +67,6 @@ moleculeProperties
|
|||||||
mass 53.12e-27;
|
mass 53.12e-27;
|
||||||
diameter 4.07e-10;
|
diameter 4.07e-10;
|
||||||
internalDegreesOfFreedom 2;
|
internalDegreesOfFreedom 2;
|
||||||
viscosityCoefficient 1.919e-5;
|
|
||||||
omega 0.77;
|
omega 0.77;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,6 @@ moleculeProperties
|
|||||||
mass 46.5e-27;
|
mass 46.5e-27;
|
||||||
diameter 4.17e-10;
|
diameter 4.17e-10;
|
||||||
internalDegreesOfFreedom 2;
|
internalDegreesOfFreedom 2;
|
||||||
viscosityCoefficient 1.656e-5;
|
|
||||||
omega 0.74;
|
omega 0.74;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +77,6 @@ moleculeProperties
|
|||||||
mass 53.12e-27;
|
mass 53.12e-27;
|
||||||
diameter 4.07e-10;
|
diameter 4.07e-10;
|
||||||
internalDegreesOfFreedom 2;
|
internalDegreesOfFreedom 2;
|
||||||
viscosityCoefficient 1.919e-5;
|
|
||||||
omega 0.77;
|
omega 0.77;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,6 @@ moleculeProperties
|
|||||||
mass 66.3e-27;
|
mass 66.3e-27;
|
||||||
diameter 4.17e-10;
|
diameter 4.17e-10;
|
||||||
internalDegreesOfFreedom 0;
|
internalDegreesOfFreedom 0;
|
||||||
viscosityCoefficient 2.117e-5;
|
|
||||||
omega 0.81;
|
omega 0.81;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,6 @@ moleculeProperties
|
|||||||
mass 46.5e-27;
|
mass 46.5e-27;
|
||||||
diameter 4.17e-10;
|
diameter 4.17e-10;
|
||||||
internalDegreesOfFreedom 2;
|
internalDegreesOfFreedom 2;
|
||||||
viscosityCoefficient 1.656e-5;
|
|
||||||
omega 0.74;
|
omega 0.74;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +79,6 @@ moleculeProperties
|
|||||||
mass 53.12e-27;
|
mass 53.12e-27;
|
||||||
diameter 4.07e-10;
|
diameter 4.07e-10;
|
||||||
internalDegreesOfFreedom 2;
|
internalDegreesOfFreedom 2;
|
||||||
viscosityCoefficient 1.919e-5;
|
|
||||||
omega 0.77;
|
omega 0.77;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user