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