|
[Sponsors] |
Use of a laplacian mesh motion solver with the 6DoF or rigidBodyMotion libraries |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 | |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 7 ![]() |
Hi all,
I'm trying to simulate the motion of multiple rigid bodies in a flow. The mesh motion solvers in the 6DoF and rigidBodyDynamics libraries aren't suitable for my geometry, I need velocityLaplacian or displacementLaplacian. This is has been done in these tutorials: http://www.tfd.chalmers.se/~hani/kur...usUrquhart.pdf http://www.tfd.chalmers.se/~hani/kur...Minghao_Wu.pdf What they do is set the mesh motion solver to displacementLaplacian in the dynamicMeshDict file and apply a sixDoFRigidBodyDisplacement boundary condition to the patches corresponding to the rigid bodies in the pointMotionU file. However, from OpenFOAM 5 onward, the 6DoFDisplacement boundary condition has been removed. Apparently the condition was buggy in parallel: https://bugs.openfoam.org/view.php?id=2487 The reason for the removal is given here: https://github.com/OpenFOAM/OpenFOAM...4de84638ad6933 Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 ![]() |
Here is an example with the rigidBody 6dof solver. This is essentially the same solver, there are however differences to the 6dof solver you are using. Which might be irrelevant. Nevertheless an example for that solver:
Code:
dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("librigidBodyMeshMotion.so"); motionSolver rigidBodyMotionSolver; meshSolver { // replace this with your solver solver displacementLayeredMotion; regions { rotorZone { interpolationScheme linear; boundaryField { rotor { type follow; patch rotor; } stator { type fixedValue; value uniform (0 0 0); } } } } } report on; rho rhoInf; rhoInf 1000; g (0 0 0); solver { type Newmark; beta 0.5; gamma 0.25; } accelerationRelaxation 0.3; //accelerationDamping 0.0; nIter 1; /* ramp table ( (0 0) (0.1 0) ); */ bodies { rotor { type sphere; parent root; mass 8.15; radius 0.0399; centreOfMass (0 0 0); transform (1 0 0 0 1 0 0 0 1) (0 0 0); joint { type composite; joints ( { type Px; } { type Py; } ); } patches (rotor); //innerDistance 0; //outerDistance 0.00029526; } } restraints { linearSpring { type linearSpring; anchor (0 0 0); restLength 0; body rotor; refAttachmentPt (0 0 0); stiffness 125000; damping 404; } } |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 7 ![]() |
This works like a charm, thanks a lot.
One question, how did you learn how to do this? A tutorial? Reading the source code? Asking someone else? |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 ![]() |
Reading the source code of the rigid body library and most importantly many years of experience
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
sreekanth
Join Date: Dec 2019
Posts: 13
Rep Power: 6 ![]() |
Hello,
My case is similar to the study done by http://www.tfd.chalmers.se/~hani/kur...usUrquhart.pdf From the above report in section 1.4.3 the author used oscillatingDisplacement for floatingObject Code:
floatingObject { type oscillatingDisplacement; amplitude (0.03 0 0); omega 6; value uniform (0 0 0); } In my case I would like to provide displacement from a text file (for example earthquake time history data for base excitation). Is there a way to do it and how to import data or txt file into pointfields file. Any suggestions will be helpful. Thanks in advance |
|
![]() |
![]() |
![]() |
![]() |
#6 | |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 7 ![]() |
Quote:
If the member variable is called, for example, basePosition, then to lookup a value from the file at time "t", you can write: Code:
scalar value = basePosition(t); |
||
![]() |
![]() |
![]() |
![]() |
#7 | |
New Member
sreekanth
Join Date: Dec 2019
Posts: 13
Rep Power: 6 ![]() |
Thank you for immediate response.
I tried looking for examples in tutorials for type interpolationTable but didnt found but I found an example usage in API URL: https://cpp.openfoam.org/v5/classFoa...tionTable.html Code:
readerType csv; fileName "$FOAM_CASE/constant/p0vsTime.csv"; hasHeaderLine true; // skip first line timeColumn 0; // time is in column 0 valueColumns (1); // value starts in column 1 Quote:
Code:
floatingObject { type oscillatingDisplacement; ... } |
||
![]() |
![]() |
![]() |
![]() |
#8 |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 7 ![]() |
You need to modify the original header and source files and compile them as a new boundary condition. Once that's done, the lines fileName, hasHeaderLine... are added in the pointDisplacement file under whichever patch is supposed to move.
If you can't find examples for interpolationTable, try the timeFunction1 class, it provides similar functionality. |
|
![]() |
![]() |
![]() |
![]() |
#9 | |
Senior Member
TWB
Join Date: Mar 2009
Posts: 402
Rep Power: 19 ![]() |
Quote:
Btw, I have written the prescribed folding deformation based on the oscillatingDisplacement code. Thanks. |
||
![]() |
![]() |
![]() |
Tags |
6dof, displacementlaplacian, rigidbodydisplacement, sixdof, velocitylaplacian |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Coupling a mesh motion based solver with sixDoFSolidBodyMotion | saifullahkhalid | OpenFOAM | 0 | April 23, 2019 08:00 |
Difficulty in calculating angular velocity of Savonius turbine simulation | alfaruk | CFX | 14 | March 17, 2017 06:08 |
How to let the mesh motion solver just solve a small region near a moving boundary? | zhajingjing | OpenFOAM Running, Solving & CFD | 9 | April 28, 2016 04:15 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 09:38 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |