CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Multi body: Unknown patchField type sixDoFRigidBodyDisplacement for patch type wall (https://www.cfd-online.com/Forums/openfoam/226175-multi-body-unknown-patchfield-type-sixdofrigidbodydisplacement-patch-type-wall.html)

pvreis April 19, 2020 17:31

Multi body: Unknown patchField type sixDoFRigidBodyDisplacement for patch type wall
 
Hi,
I'm trying to simulate two bodies in two degree of freedom using pimpleDyMFoam.
I set the wall of the two bodies as sixDoFRigidBodyDisplacement.
I have already set in controlDict file library "libforces.so" in order to run sixDoFRigidBodyDisplacement.
However, I got the following error:

--> FOAM FATAL IO ERROR:
Unknown patchField type sixDoFRigidBodyDisplacement for patch type wall

Valid patchField types are :

31
(
angularOscillatingDisplacement
angularOscillatingVelocity
calculated
codedFixedValue
cyclic
cyclicACMI
cyclicAMI
cyclicRepeatAMI
cyclicSlip
empty
fixedNormalSlip
fixedValue
nonuniformTransformCyclic
oscillatingDisplacement
oscillatingVelocity
processor
processorCyclic
slip
solidBodyMotionDisplacement
surfaceDisplacement
surfaceSlipDisplacement
symmetry
symmetryPlane
timeVaryingMappedFixedValue
timeVaryingUniformFixedValue
uniformFixedValue
uniformInterpolatedDisplacement
value
waveDisplacement
wedge
zeroGradient
)



Any sugestion?
Thanks.

pvreis April 20, 2020 15:34

These are my files if necessary (pointDisplacement and dynamicMeshDict)



/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class pointVectorField;
location "0.01";
object pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 0 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
cylinder1
{
type sixDoFRigidBodyDisplacement;
value uniform (0 0 0);

innerDistance 0.15; // motion area
outerDistance 1.5; // dynamic mesh area
mass 161.69841; // structural mass
centreOfMass (-0.25 0 0.165); //massa sup
momentOfInertia (2.09904751 2.09904751 1.26326884);
g (0 0 -9.81);
orientation
(
1 0 0
0 1 0
0 0 1
);

velocity (0 0 0);
angularMomentum (0 0 0);
rho rhoInf;
rhoInf 998.21;
// accelerationRelaxation 0.9;
// accelerationDamping 0.95;
report on;
reportToFile on;

solver
{
type symplectic;
}
constraints
{
maxIteration 1000;

noRotate1
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 0 1);
}
noRotate2
{
sixDoFRigidBodyMotionConstraint axis;
axis (1 0 0);
}
noRotate3
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 1 0);
}
restrain_z
{
sixDoFRigidBodyMotionConstraint plane; // Plane - restrain z and allow x and y
normal (0 0 1);
}
}


restraints
{
verticalSpring1
{
sixDoFRigidBodyMotionRestraint linearSpring;

anchor (-0.25 5000.75 0.165);// m -spring attached point on bottom
refAttachmentPt (-0.25 0 0.165);//m - spring attached point on cylinder
stiffness 0.00025167094001214400;//N/m
damping 0;//Ns/m
restLength 5000;//m
}


verticalSpring2
{
sixDoFRigidBodyMotionRestraint linearSpring;

anchor (-0.25 -5000.75 0.165);// m -spring attached point on bottom
refAttachmentPt (-0.25 0 0.165);//m - spring attached point on cylinder
stiffness 0.00025167094001214400;//N/m
damping 0;//Ns/m
restLength 5000;//m
}


horizontalSpring1
{
sixDoFRigidBodyMotionRestraint linearSpring;

anchor (-5001 0 0.165);// m -spring attached point on bottom
refAttachmentPt (-0.25 0 0.165);//m - spring attached point on cylinder
stiffness 0.00025167094001214400;//N/m
damping 0;//Ns/m
restLength 5000;//m
}

horizontalSpring2
{
sixDoFRigidBodyMotionRestraint linearSpring;

anchor (5000.5 0 0.165);// m -spring attached point on bottom
refAttachmentPt (-0.25 0 0.165);//m - spring attached point on cylinder
stiffness 0.00025167094001214400;//N/m
damping 0;//Ns/m
restLength 5000;//m

}
}
}




cylinder2
{
type sixDoFRigidBodyDisplacement;

innerDistance 0.15; // motion area
outerDistance 1.5; // dynamic mesh area
mass 161.69841; // structural mass
centreOfMass (0.25 0 0.165); //massa sup
momentOfInertia (2.09904751 2.09904751 1.26326884);
g (0 0 -9.81);
orientation
(
1 0 0
0 1 0
0 0 1
);

velocity (0 0 0);
angularMomentum (0 0 0);
rho rhoInf;
rhoInf 998.21;
// accelerationRelaxation 0.9;
// accelerationDamping 0.95;
report on;
reportToFile on;

solver
{
type symplectic;
}
constraints
{
maxIteration 1000;

noRotate1
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 0 1);
}
noRotate2
{
sixDoFRigidBodyMotionConstraint axis;
axis (1 0 0);
}
noRotate3
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 1 0);
}
restrain_z
{
sixDoFRigidBodyMotionConstraint plane; // Plane - restrain z and allow x and y
normal (0 0 1);
}
}


restraints
{
verticalSpring3
{
sixDoFRigidBodyMotionRestraint linearSpring;

anchor (0.25 5000.75 0.165);// m -spring attached point on bottom
refAttachmentPt (0.25 0 0.165);//m - spring attached point on cylinder
stiffness 0.00025167094001214400;//N/m
damping 0;//Ns/m
restLength 5000;//m
}


verticalSpring4
{
sixDoFRigidBodyMotionRestraint linearSpring;

anchor (0.25 -5000.75 0.165);// m -spring attached point on bottom
refAttachmentPt (0.25 0 0.165);//m - spring attached point on cylinder
stiffness 0.00025167094001214400;//N/m
damping 0;//Ns/m
restLength 5000;//m
}


horizontalSpring3
{
sixDoFRigidBodyMotionRestraint linearSpring;

anchor (-5000.5 0 0.165);// m -spring attached point on bottom
refAttachmentPt (0.25 0 0.165);//m - spring attached point on cylinder
stiffness 0.00025167094001214400;//N/m
damping 0;//Ns/m
restLength 5000;//m
}

horizontalSpring4
{
sixDoFRigidBodyMotionRestraint linearSpring;

anchor (5001 0 0.165);// m -spring attached point on bottom
refAttachmentPt (0.25 0 0.165);//m - spring attached point on cylinder
stiffness 0.00025167094001214400;//N/m
damping 0;//Ns/m
restLength 5000;//m

}
}
}


front
{
type empty;
}

back
{
type empty;
}


".*"
{
type fixedValue;
value uniform (0 0 0);
}
}


// ************************************************** *********************** //





/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object motionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh dynamicMotionSolverFvMesh;

motionSolverLibs
(
// "libsixDoFRigidBodyMotion.so"
"libfvMotionSolvers.so"
);

solver displacementLaplacian;

//diffusivity quadratic inverseDistance 5.0 (cilindro); //5=uniforme

displacementLaplacianCoeffs
{
diffusivity inverseDistance ( cylinder1 cylinder2);
}

// ************************************************** *********************** //

aow April 23, 2020 21:45

Hi Paulo,

You've got things mixed up in your files. A lot of the lines in your pointDisplacement file are meant to be in your dynamicMeshDict instead. Also, sixDoFRigidBodyDisplacement is not a type of boundary condition as far as I know, which is essentially what the error message in your first post is telling you.

I think you should check out the OpenFOAM Wiki documentation page for the sixDoFRigidBodyMotion solver in order to properly understand how you should be setting up the dynamicMeshDict. It might also be helpful to browse around in the tutorials section of the OpenFOAM github repository. More specifically, you can find instances of the sixDoFRigidBodyMotion solver being used if you go to multiphase/RAS/DTCHullMoving or multiphase/RAS/floatingObject, which provide pointDisplacement and dynamicMeshDict file examples.

Andrew

P.S. - You should probably post things like this in the Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD section of the forum instead of the main OpenFOAM section.

pvreis April 24, 2020 04:36

Quote:

Originally Posted by aow (Post 767104)
Hi Paulo,

You've got things mixed up in your files. A lot of the lines in your pointDisplacement file are meant to be in your dynamicMeshDict instead. Also, sixDoFRigidBodyDisplacement is not a type of boundary condition as far as I know, which is essentially what the error message in your first post is telling you.

I think you should check out the OpenFOAM Wiki documentation page for the sixDoFRigidBodyMotion solver in order to properly understand how you should be setting up the dynamicMeshDict. It might also be helpful to browse around in the tutorials section of the OpenFOAM github repository. More specifically, you can find instances of the sixDoFRigidBodyMotion solver being used if you go to multiphase/RAS/DTCHullMoving or multiphase/RAS/floatingObject, which provide pointDisplacement and dynamicMeshDict file examples.

Andrew

P.S. - You should probably post things like this in the Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD section of the forum instead of the main OpenFOAM section.


Thank you for the response, Andrew! Next time I will post in Solving & CFD section. Thank you for the advise.

You were right. I've mixed files. I checked openfoamwiki and I did a similar file now.

However, I want to calculate the center of mass for each body (not computing just one point for center of mass symbolizing both bodies. But I want to compute one point for each body for center of mass in log file or similar). Do you know how to do that?

Better: How do I set dynamicMeshDict for two moving bodies and put 4 springs for each cylinder (identical cylinders)?

PS.: Actually I mixed the files because I wanted to get the center of mass of each body. One of the solutions I researched in websites was mixing files like this. But it was wrong as you said.

aow April 24, 2020 15:19

Hey Paulo,

No problem, I'm happy to help, especially I've gone through my own struggles with learning to use the sixDoFRigidBodyMotion solver.

Concerning your questions, there is both good and bad news. The good news is that it is possible to model multiple bodies using the sixDoFRigidBodyMotion solver; however, the bad news is that you will need to do a fair amount of additional work before even being able to try it out since the coding for this has not been developed in the official OpenFOAM release versions yet. Also, I double-checked the current set of tutorials and did not find a single example of a multi-body simulation or any information about a built-in multi-body solver in any openfoam.org releases.

To find some resources explaining how to implement the multi-body dynamics, you can find great OpenFOAM tutorials on Hakan Nilsson's CFD course webpage, which come with presentations and reports. More specifically, the reports A tutorial of the sixDofRigidBodyMotion library
with multiple bodies
and Coupled motion of two floating objects by Magnus Urquhart and Minghao Wu, respectively, provide detailed descriptions of how you can augment the default solver to create a multi-body solver.

There are also some CFD Online forum posts concerning this matter too that might be worth reading through to better understand the situation. In particular, the ones I know of are as follows:
  1. sixDoFRigidBody with more than one body
  2. Multiple Floating Objects with 6DoF in OF 2.3.0
  3. Multiple floating objects using InterDyMFoam and sixDoFRigidBodyMotion solver
Unfortunately, the first two of these posts are rather outdated and you already found the last one so perhaps there are better resources than these ones that I saved previously. A quick Google search didn't turn up a whole lot though in terms of additional CFD Online forum posts.

Sorry I can't be of more help, good luck!

Andrew

Fluid Tool June 2, 2020 06:27

Hi Andrew,

I post answer at link below. It got from your link

https://www.cfd-online.com/Forums/op...tml#post772959


All times are GMT -4. The time now is 09:10.