Skip to content
Snippets Groups Projects
Commit 8af82f02 authored by Henry's avatar Henry
Browse files

sixDoFRigidBodyMotion: remove the constraint and restraint "Coeffs"

sub-dict and put the coefficients in the containing dictionary.
parent d57f9834
Branches
Tags
No related merge requests found
Showing
with 58 additions and 87 deletions
......@@ -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,11 +50,8 @@ boundaryField
sixDoFRigidBodyMotionConstraint fixedLine;
tolerance 1e-9;
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
......@@ -62,10 +59,7 @@ boundaryField
sixDoFRigidBodyMotionConstraint fixedAxis;
tolerance 1e-06;
relaxationFactor 0.7;
fixedAxisCoeffs
{
axis ( 0 0 1 );
}
axis (0 0 1);
}
}
restraints
......@@ -73,27 +67,19 @@ 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;
}
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;
}
axis (0 0 1);
stiffness 700;
damping 0.5;
referenceOrientation $orientation;
}
}
value uniform (0 0 0);
......@@ -109,11 +95,11 @@ boundaryField
type empty;
}
".*"
{
type fixedValue;
value uniform (0 0 0);
}
".*"
{
type fixedValue;
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,14 +45,11 @@ boundaryField
{
sixDoFRigidBodyMotionRestraint linearSpring;
linearSpringCoeffs
{
anchor (0.5 0.5 1);
refAttachmentPt $centreOfMass;
stiffness 5000;
damping 50;
restLength 0.4;
}
anchor (0.5 0.5 1);
refAttachmentPt $centreOfMass;
stiffness 5000;
damping 50;
restLength 0.4;
}
}
constraints
......@@ -65,7 +61,6 @@ boundaryField
sixDoFRigidBodyMotionConstraint fixedOrientation;
tolerance 1e-6;
relaxationFactor 1.0;
fixedOrientationCoeffs {}
}
fixedLine1
......@@ -73,11 +68,8 @@ boundaryField
sixDoFRigidBodyMotionConstraint fixedLine;
tolerance 1e-6;
relaxationFactor 1.0;
fixedLineCoeffs
{
refPoint $centreOfMass;
direction (0 0 1);
}
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;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment