|
[Sponsors] |
transform in the new motion library rigidBodyMeshMotion |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 14, 2018, 00:46 |
transform in the new motion library rigidBodyMeshMotion
|
#1 |
Member
Jiadong Wang
Join Date: Mar 2018
Location: Australia
Posts: 32
Rep Power: 8 |
Hello Foamers,
Recently, I’m trying to conduct the tutorial wingMotion with the new motion library rigidBodyMeshMotion. This tutorial originally employs the sixDoFRigidBodyMotion. Unfortunately, the new case with rigidBodyMeshMotion has some problems. One of quite weird things is the moment of linearAxialAngularSpring has a same direction with angle, which means the axis spring accelerate the rotation instead of restraining it. Also, I’m quite confused about the parameter ‘transform’ in dynamicMeshDict of rigidBodyMeshMotion. I have attached the modified dynamicMeshDict (rigidBodyMeshMotion) and original dynamicMeshDict (sixDoFRigidBodyMotion) to this post. Does anyone have the experience with this new motion library rigidBodyMeshMotion? Any suggestions will be appreciated. Thank you. dynamicMeshDict of rigidBodyMeshMotion: Code:
/*--------------------------------*- 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 dictionary; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libRY05rigidBodyMeshMotion.so"); motionSolver rigidBodyMotion; report on; solver { type symplectic; } g (0 -9.81 0); rho rhoInf; rhoInf 1; bodies { wing { type rigidBody; parent root; centreOfMass (0.4974612746 -0.01671895744 0.125); mass 22.9; inertia (1.958864357 0 0 3.920839234 0 2.057121362); transform (1 0 0 0 1 0 0 0 1) (0.25 0.007 0.125); joint { type composite; joints ( { type Py; } { type Rz; } ); } patches (wing); innerDistance 0.3; outerDistance 1; } } restraints { verticalSpring { type linearSpring; body wing; anchor (0.25 0.007 0.125); refAttachmentPt (0.25 0.007 0.125); stiffness 4000; damping 2; restLength 0; } axialSpring { type linearAxialAngularSpring; body wing; axis (0 0 1); referenceOrientation (1 0 0 0 1 0 0 0 1); stiffness 700; damping 0.5; } } // ************************************************************************* // Code:
/*--------------------------------*- 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 dictionary; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libtest00.so"); motionSolver sixDoFRigidBodyMotion; patches (wing); innerDistance 0.3; outerDistance 1; mass 22.9; centreOfMass (0.4974612746 -0.01671895744 0.125); momentOfInertia (1.958864357 3.920839234 2.057121362); orientation ( 0.9953705935 0.09611129781 0 -0.09611129781 0.9953705935 0 0 0 1 ); angularMomentum (0 0 -2); g (0 -9.81 0); rho rhoInf; rhoInf 1; report on; solver { type symplectic; } constraints { yLine { sixDoFRigidBodyMotionConstraint line; centreOfRotation (0.25 0.007 0.125); direction (0 1 0); } zAxis { sixDoFRigidBodyMotionConstraint axis; axis (0 0 1); } } restraints { verticalSpring { sixDoFRigidBodyMotionRestraint linearSpring; anchor (0.25 0.007 0.125); refAttachmentPt (0.25 0.007 0.125); stiffness 4000; damping 2; restLength 0; } axialSpring { sixDoFRigidBodyMotionRestraint linearAxialAngularSpring; axis (0 0 1); stiffness 700; damping 0.5; referenceOrientation $orientation; } } // ************************************************************************* // |
|
July 14, 2018, 00:51 |
|
#2 |
Member
Jiadong Wang
Join Date: Mar 2018
Location: Australia
Posts: 32
Rep Power: 8 |
Just ignore the name of library in both dynamicMeshDict. That’s the recompiled version without any changes except I add some output orders using Info.
|
|
July 15, 2018, 22:43 |
|
#3 |
Member
Jiadong Wang
Join Date: Mar 2018
Location: Australia
Posts: 32
Rep Power: 8 |
Any ideas?
|
|
January 25, 2020, 18:27 |
|
#4 |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 8 |
I'm struggling with the same questions as OP.
In interFoam's floating object tutorial (OpenFOAM v6), there's two dynamic mesh dictionaries, one for the sixDoF library and one for the rigidBodyMotion library. sixDoF: Code:
centreOfMass (0.5 0.45 0.35); Code:
centreOfMass (0 0 0.25); transform (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1); |
|
March 28, 2020, 18:20 |
|
#5 |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 8 |
Anyone? Any ideas?
|
|
October 12, 2020, 08:51 |
|
#6 |
Member
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 12 |
Any ideas??
|
|
February 10, 2021, 16:23 |
|
#7 |
Member
Himanshu
Join Date: Jan 2017
Posts: 34
Rep Power: 9 |
any ideas?..
all confused here.. |
|
February 10, 2021, 17:08 |
|
#8 |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 8 |
So I've been working with and testing the rigidBodyDynamics library for some time. I'm not 100% certain so take everything I say with a grain of salt, especially regarding the coordinate transform.
The tensor and vector specified under the transform keyword represent a coordinate transform from the parent frame to the local frame of the body's joint. The vector is the displacement of the origin of the local frame relative to the parent frame and the tensor is its rotation (google 3D rotation matrix). The frame of the root body is identical to the global frame. The centre of mass of a body is specified relative to its local frame. So the following dictionary from the floating object tutorial Code:
centreOfMass (0 0 0.25); transform (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1); About the problem with the axial spring restraint mentioned in the OP, I think the problem is with the direction of the vector "a" that the class uses to determine the sense of the applied moment. This was a while ago but if I remember correctly, rectifying the problem required only a very simple modification to the class. |
|
March 17, 2021, 02:06 |
Transform in dynamic mesh dict
|
#9 | ||
Member
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 12 |
Quote:
Quote:
https://ibb.co/tqfHZ7v This is the image of my case set up. It consists of a domain and two floating objects. I have to specify center of mass and transform for both the objects. Dimension of the bodies are Lx=0.3 , Ly=0.2 , Lz=0.5. Iam confused on how to specify the Center of mass and transform. As per the above quote, the center of mass has to be specified based on the local co ordinate of the body. So COM will be (0,0,0.25) for both the body, assuming the local co ordinate system to be at the bottom of either bodies.(Correct me if iam wrong) I presume the center of rotaion to be at 0.1 m above the center of mass, Which has to be defined in the global co ordinate system (Correct me if iam wrong). Both bodies are identical. Domain size is (1 1 1) (-1 -1 -1). COM for first body with respect to Global Co ordinate system is (-0.5,0.45,0.35) COM for second body with respect to Global Co ordinate system is (0.5,0.45,0.35) Please help me on how to specify the center of mass and transform. Iam using Openfoam V 2006. How can we find the Local co ordinate system values using paraview? https://ibb.co/m4Q9z90 Sketch of Domain and body. |
|||
March 17, 2021, 03:12 |
|
#10 | |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 8 |
Quote:
Code:
centreOfMass (0 0 -0.1); transform (1 0 0 0 1 0 0 0 1) (-0.5 0.45 0.45); |
||
March 17, 2021, 05:48 |
|
#11 | |
Member
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 12 |
Quote:
|
||
March 17, 2021, 07:46 |
|
#12 |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 8 |
||
June 16, 2021, 07:44 |
|
#13 |
New Member
Florian
Join Date: Apr 2021
Posts: 8
Rep Power: 5 |
Hi tecmul,
Thanks for your explanations, now I understand a bit more the function "transform" in the file dynamicMeshDict. Do you (or any other foamer) know what is the point of having a local frame different from the global frame ? In the tutorial of interDyMFoam, I think they have to do this to precise to which point is applied the joint Py. Indeed, I think the joint Py (or Pxy, Pxyz, Pz etc...) is always applied to the origin of the local frame, which is here the point (0.5 0.45 0.1) in global frame. Therefore, it is in agreement with, the constraint fixedLine in the file "dynamicMeshDict.sixDoF" : the point (0.5 0.45 0.1) can only translate along y axis. Am I right ? Are there others points to set a different local frame ? Moreover, why do we have to work with these two files (dynamicMeshDict and dynamicMeshDict.sixDoF) whereas most information are redundant between them ? I think that dynamicMeshDict is dedicated to the mesh of the cuboid whereas the other file is dedicated to rest of the mesh but I'm not sure... |
|
June 16, 2021, 11:00 |
|
#14 |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 8 |
Hello Florian, glad I could help.
I don't know the answer to your first question, but if I had to guess I'd say it's something to do with Roy Featherstone's algorithm. The rigid body dynamics library is based on his work and mirrors its logic. The two dynamic mesh dictionary files are for use with the two rigid body dynamics libraries currently available in OpenFoam. The former file is for use with the rigidBodyDynamics library, the latter for sixDoF. See 212949-flow-induced-3d-motion-openfoam.html#post719121 for a post on the differences between the two libraries. |
|
June 17, 2021, 05:55 |
|
#15 | ||
New Member
Florian
Join Date: Apr 2021
Posts: 8
Rep Power: 5 |
Quote:
I have a question about this sentence : Quote:
Moreover what is mesh motion solver ? Is it the solver mentionned like this : solver { type Newmark; } so it would mean that the sixDoFRigidBodyMotion can be solved with Newmark, Crank-Nicolson and Symplectic (which is confirmed here https://openfoamwiki.net/index.php/P...onSolverFvMesh) but for rigidBodyDynamics, less solvers can be used ? (there is at least Newmark according to the tutorial) Another question : Do you know why no inertia is mentionned in the tutorial using rigidBodyMeshMotion library ? I tried to add diagonal coefficients, but it does not change the results.. Thanks in advance, Florian |
|||
July 3, 2021, 06:51 |
|
#16 | ||
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 8 |
Quote:
Quote:
If you mean the floating object tutorial, then that's because the library is calculating the moment of inertia for you. It can do this because the shape (type->cuboid), dimensions and density of the floating body have been specified. |
|||
July 10, 2021, 12:42 |
|
#17 | |
Member
Himanshu
Join Date: Jan 2017
Posts: 34
Rep Power: 9 |
Quote:
Thank you for sharing your knowledge. what ever you said , i was able to make sense from tutorial "multiphase\interFoam\RAS\floatingObject". when i check thoroughly the result, what ever you said the relation of COM and vector (in transform).... but, when I saw tutorial "multiphase\overInterDyMFoam\boatAndPropeller" , then in dynamicMeshDict, its written as: centreOfMass (-0.2847 0.03 0); // Relative to parent CoM mass 0.0288; inertia (7.6e-6 0 0 4.2e-6 0 4.2e-6); // transform and CoR - relative to parent CoR transform (1 0 0 0 1 0 0 0 1) (-0.2757 0.03 0); i.e. COM w.r.t parent COM and COR w.r.t parent COR.. is this because in "multiphase\overInterDyMFoam\boatAndPropeller" , we have multi rigid connected bodies? Thank You |
||
September 14, 2021, 08:02 |
|
#18 |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 8 |
Yes the boat and propeller tutorial confused me as well. I think the comment is wrong here because I've run tests of double pendulums and the centre of mass does indeed seem to be specified relative to the body's own joint, not the parent's centre of mass. But again, I'm not 100% sure.
|
|
November 15, 2024, 12:26 |
|
#19 |
New Member
Dilip
Join Date: Sep 2024
Posts: 8
Rep Power: 2 |
dynamicFvMesh dynamicOversetFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so"); motionSolver sixDoFRigidBodyMotion; patches (naca); innerDistance 0.3; outerDistance 7.0; //rhoSolid 10.0; mass 7.853982; centreOfMass (0.04 0 0); momentOfInertia (0.00001 0.000001 1.5707963); orientation ( 1 0 0 0 1 0 0 0 1 ); angularMomentum (0 0 0); g (0 0 0); rho rhoInf; rhoInf 1.0; report on; accelerationRelaxation 0.9; //accelerationDamping 1.0; solver { type symplectic; } constraints { yLine // will oscilite only in y direction { sixDoFRigidBodyMotionConstraint line; direction (0 1 0); } zAxis // taking my airfoil in up and rotation little bit at z direction { sixDoFRigidBodyMotionConstraint axis; axis (0 0 1); } } restraints { linearSpring { sixDoFRigidBodyMotionRestraint linearSpring; anchor (0 0 0); refAttachmentPt (0 0 0); stiffness 6.328147; // at Ur* 9 damping 0; // units of Ns/m restLength 0.0; // units of m also rest length is same as refAttachmentPt } axialSpring { sixDoFRigidBodyMotionRestraint linearAxialAngularSpring; axis (0 0 1); stiffness 1.265557; damping 0.028199; referenceOrientation $orientation; } } HOW TO DEFINE CENTRE OF MASS AND CENTRE OF ROTATION IF CENTRE OF MASS IS AT DIFFERENT LOCATION THAN CENTRE OF ROTATION. I AM WORKING ON 2DOF WING MOTION PROBLEM IN WHICH STATIC IMBALANCE IS GIVEN -0.04 S*=b/C. MY CORD LENGTH OF FOIL IS 1 AND I DEFINE PIVOT AT (0 0 0). THATS IS -0.25 TO 0.75 WHICH MAKES CORD LENGTH 1 AND XP = (0 0 0) WHICH IS MY PIVOT POINT. NOW HOW SHOULD I DEFINE CENTRE OF ROTATION AND CENTRE OF MASS IF THEY ARE AT DIFFERENT LOCATION. |
|
Tags |
rigid body motion, transform, wing motion |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
How to use "translation" in solidBodyMotionFunction in OpenFOAM | rupesh_w | OpenFOAM Running, Solving & CFD | 5 | August 16, 2016 05:27 |
External management of solid motion (using dynamicmesh) | maxou1993 | Main CFD Forum | 0 | July 28, 2015 12:37 |
decomposePar is missing a library | whk1992 | OpenFOAM Pre-Processing | 8 | March 7, 2015 08:53 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |