mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
sixDoFRigidBodyMotion: remove the constraint and restraint "Coeffs"
sub-dict and put the coefficients in the containing dictionary.
This commit is contained in:
@ -43,14 +43,7 @@ Foam::sixDoFRigidBodyMotionConstraint::sixDoFRigidBodyMotionConstraint
|
||||
)
|
||||
:
|
||||
name_(name),
|
||||
sDoFRBMCCoeffs_
|
||||
(
|
||||
sDoFRBMCDict.subDict
|
||||
(
|
||||
word(sDoFRBMCDict.lookup("sixDoFRigidBodyMotionConstraint"))
|
||||
+ "Coeffs"
|
||||
)
|
||||
)
|
||||
sDoFRBMCCoeffs_(sDoFRBMCDict)
|
||||
{}
|
||||
|
||||
|
||||
@ -67,7 +60,7 @@ bool Foam::sixDoFRigidBodyMotionConstraint::read
|
||||
const dictionary& sDoFRBMCDict
|
||||
)
|
||||
{
|
||||
sDoFRBMCCoeffs_ = sDoFRBMCDict.subDict(type() + "Coeffs");
|
||||
sDoFRBMCCoeffs_ = sDoFRBMCDict;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -29,9 +29,8 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(sixDoFRigidBodyMotionRestraint, 0);
|
||||
|
||||
defineRunTimeSelectionTable(sixDoFRigidBodyMotionRestraint, dictionary);
|
||||
defineTypeNameAndDebug(sixDoFRigidBodyMotionRestraint, 0);
|
||||
defineRunTimeSelectionTable(sixDoFRigidBodyMotionRestraint, dictionary);
|
||||
}
|
||||
|
||||
|
||||
@ -44,14 +43,7 @@ Foam::sixDoFRigidBodyMotionRestraint::sixDoFRigidBodyMotionRestraint
|
||||
)
|
||||
:
|
||||
name_(name),
|
||||
sDoFRBMRCoeffs_
|
||||
(
|
||||
sDoFRBMRDict.subDict
|
||||
(
|
||||
word(sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint"))
|
||||
+ "Coeffs"
|
||||
)
|
||||
)
|
||||
sDoFRBMRCoeffs_(sDoFRBMRDict)
|
||||
{}
|
||||
|
||||
|
||||
@ -68,7 +60,7 @@ bool Foam::sixDoFRigidBodyMotionRestraint::read
|
||||
const dictionary& sDoFRBMRDict
|
||||
)
|
||||
{
|
||||
sDoFRBMRCoeffs_ = sDoFRBMRDict.subDict(type() + "Coeffs");
|
||||
sDoFRBMRCoeffs_ = sDoFRBMRDict;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||
dict.lookupOrDefault
|
||||
(
|
||||
"initialOrientation",
|
||||
dict.lookupOrDefault("orientation", I)
|
||||
dict.lookupOrDefault("orientation", tensor::I)
|
||||
)
|
||||
),
|
||||
momentOfInertia_(dict.lookup("momentOfInertia")),
|
||||
|
||||
@ -63,7 +63,7 @@ Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState
|
||||
)
|
||||
:
|
||||
centreOfMass_(dict.lookup("centreOfMass")),
|
||||
Q_(dict.lookupOrDefault("orientation", tensor(I))),
|
||||
Q_(dict.lookupOrDefault("orientation", tensor::I)),
|
||||
v_(dict.lookupOrDefault("velocity", vector::zero)),
|
||||
a_(dict.lookupOrDefault("acceleration", vector::zero)),
|
||||
pi_(dict.lookupOrDefault("angularMomentum", vector::zero)),
|
||||
|
||||
@ -50,22 +50,16 @@ boundaryField
|
||||
sixDoFRigidBodyMotionConstraint fixedLine;
|
||||
tolerance 1e-9;
|
||||
relaxationFactor 0.7;
|
||||
fixedLineCoeffs
|
||||
{
|
||||
refPoint (0.25 0.007 0.125);
|
||||
direction (0 1 0);
|
||||
}
|
||||
}
|
||||
|
||||
fixedAxis1
|
||||
{
|
||||
sixDoFRigidBodyMotionConstraint fixedAxis;
|
||||
tolerance 1e-06;
|
||||
relaxationFactor 0.7;
|
||||
fixedAxisCoeffs
|
||||
{
|
||||
axis ( 0 0 1 );
|
||||
}
|
||||
axis (0 0 1);
|
||||
}
|
||||
}
|
||||
restraints
|
||||
@ -73,29 +67,21 @@ boundaryField
|
||||
verticalSpring
|
||||
{
|
||||
sixDoFRigidBodyMotionRestraint linearSpring;
|
||||
|
||||
linearSpringCoeffs
|
||||
{
|
||||
anchor (0.25 0.007 0.125);
|
||||
refAttachmentPt (0.25 0.007 0.125);
|
||||
stiffness 4000;
|
||||
damping 2;
|
||||
restLength 0;
|
||||
}
|
||||
}
|
||||
axialSpring
|
||||
{
|
||||
sixDoFRigidBodyMotionRestraint linearAxialAngularSpring;
|
||||
|
||||
linearAxialAngularSpringCoeffs
|
||||
{
|
||||
axis (0 0 1);
|
||||
stiffness 700;
|
||||
damping 0.5;
|
||||
referenceOrientation $orientation;
|
||||
}
|
||||
}
|
||||
}
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
|
||||
motionSolverLibs ("libfvMotionSolvers.so");
|
||||
motionSolverLibs ("libfvMotionSolvers.so" "libsixDoFRigidBodyMotion.so");
|
||||
|
||||
solver displacementLaplacian;
|
||||
|
||||
|
||||
@ -21,37 +21,40 @@ FoamFile
|
||||
{
|
||||
type patch;
|
||||
nFaces 72;
|
||||
startFace 25168;
|
||||
startFace 22911;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 40;
|
||||
startFace 25240;
|
||||
startFace 22983;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 62;
|
||||
startFace 25280;
|
||||
startFace 23023;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
nFaces 12559;
|
||||
startFace 25342;
|
||||
inGroups 1(empty);
|
||||
nFaces 11431;
|
||||
startFace 23085;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
nFaces 12559;
|
||||
startFace 37901;
|
||||
inGroups 1(empty);
|
||||
nFaces 11431;
|
||||
startFace 34516;
|
||||
}
|
||||
wing
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 378;
|
||||
startFace 50460;
|
||||
startFace 45947;
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@ -21,37 +21,40 @@ FoamFile
|
||||
{
|
||||
type patch;
|
||||
nFaces 72;
|
||||
startFace 25168;
|
||||
startFace 22911;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 40;
|
||||
startFace 25240;
|
||||
startFace 22983;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 62;
|
||||
startFace 25280;
|
||||
startFace 23023;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
nFaces 12559;
|
||||
startFace 25342;
|
||||
inGroups 1(empty);
|
||||
nFaces 11431;
|
||||
startFace 23085;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
nFaces 12559;
|
||||
startFace 37901;
|
||||
inGroups 1(empty);
|
||||
nFaces 11431;
|
||||
startFace 34516;
|
||||
}
|
||||
wing
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 378;
|
||||
startFace 50460;
|
||||
startFace 45947;
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@ -33,7 +33,6 @@ boundaryField
|
||||
momentOfInertia (0.1052 0.1052 0.1778);
|
||||
mass 9.6;
|
||||
velocity (0 0 0);
|
||||
orientation (1 0 0 0 1 0 0 0 1);
|
||||
acceleration (0 0 0);
|
||||
angularMomentum (0 0 0);
|
||||
torque (0 0 0);
|
||||
@ -46,8 +45,6 @@ boundaryField
|
||||
{
|
||||
sixDoFRigidBodyMotionRestraint linearSpring;
|
||||
|
||||
linearSpringCoeffs
|
||||
{
|
||||
anchor (0.5 0.5 1);
|
||||
refAttachmentPt $centreOfMass;
|
||||
stiffness 5000;
|
||||
@ -55,7 +52,6 @@ boundaryField
|
||||
restLength 0.4;
|
||||
}
|
||||
}
|
||||
}
|
||||
constraints
|
||||
{
|
||||
maxIterations 500;
|
||||
@ -65,7 +61,6 @@ boundaryField
|
||||
sixDoFRigidBodyMotionConstraint fixedOrientation;
|
||||
tolerance 1e-6;
|
||||
relaxationFactor 1.0;
|
||||
fixedOrientationCoeffs {}
|
||||
}
|
||||
|
||||
fixedLine1
|
||||
@ -73,13 +68,10 @@ boundaryField
|
||||
sixDoFRigidBodyMotionConstraint fixedLine;
|
||||
tolerance 1e-6;
|
||||
relaxationFactor 1.0;
|
||||
fixedLineCoeffs
|
||||
{
|
||||
refPoint $centreOfMass;
|
||||
direction (0 0 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
|
||||
motionSolverLibs ("libfvMotionSolvers.so");
|
||||
motionSolverLibs ("libfvMotionSolvers.so" "libsixDoFRigidBodyMotion.so");
|
||||
|
||||
solver displacementLaplacian;
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ FoamFile
|
||||
stationaryWalls
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 11200;
|
||||
startFace 277808;
|
||||
}
|
||||
@ -32,6 +33,7 @@ FoamFile
|
||||
floatingObject
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 672;
|
||||
startFace 290608;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user