|
[Sponsors] |
Calculating rather than prescribing solid body motion using immersed boundary method? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 25, 2019, 19:47 |
Calculating rather than prescribing solid body motion using immersed boundary method?
|
#1 |
New Member
Join Date: Sep 2019
Posts: 17
Rep Power: 6 |
Hello,
I am using foam-extend-4.0. I have a simulation working using the movingCylinderInChannelIco tutorial, which uses the immersed boundary method. The dynamicMeshDict uses immersedBoundarySolidBodyMotionFvMesh: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | foam-extend: Open Source CFD | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: http://www.foam-extend.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // dynamicFvMesh staticFvMesh; dynamicFvMesh immersedBoundarySolidBodyMotionFvMesh; immersedBoundarySolidBodyMotionFvMeshCoeffs { motionFunctions ( cylinder { // solidBodyMotionFunction translation; // translationCoeffs // { // velocity (0.1 0 0); // } solidBodyMotionFunction linearOscillation; linearOscillationCoeffs { amplitude (0 0.3 0); period 1.5; } } ); } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicMotionSolverFvMesh; //staticFvMeshCoeffs //{ //} motionSolverLibs ( "libsixDoFRigidBodyMotion.so" ); solver sixDoFRigidBodyMotion; //diffusivity quadratic inverseDistance 1 ( cylinder ); sixDoFRigidBodyMotionCoeffs { patches ( cylinder ); innerDistance 0.05; outerDistance 0.7; centreOfMass ( 0 0 0 ); mass 75.362562415; g ( 0 0 -9.8065 ); momentOfInertia ( 2.7874e+08 5.8901e+08 6.6762e+08 ); velocity ( 0 0 0 ); rho rhoInf; rhoInf 1.225; accelerationRelaxation 0.5; //accelerationDamping 0.95; report on; reportToFile on; solver { type Newmark; } constraints { onlymoveiny { sixDoFRigidBodyMotionConstraint line; direction (0 1 0); } norotation { sixDoFRigidBodyMotionConstraint orientation; } } restraints { spring { sixDoFRigidBodyMotionRestraint linearSpring; anchor (0 1.8 0); refAttachmentPt (0 0 0); stiffness 40000; damping 3.47246454; restLength 1.8; } } } /* dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libsixDoFRigidBodyMotion.so"); motionSolver sixDoFRigidBodyMotion; diffusivity quadratic inverseDistance 1 ( cylinder ); patches (cylinder); innerDistance 0.3; outerDistance 1; mass 4; centreOfMass (0 0 0); momentOfInertia (1.958864357 3.920839234 2.057121362); orientation ( 0.9953705935 0.09611129781 0 -0.09611129781 0.9953705935 0 0 0 1 ); g (0 -9.81 0); rho rhoInf; rhoInf 1; report on; solver { type symplectic; } constraints { fixedLine { sixDoFRigidBodyMotionConstraint fixedAxis; axis (0 1 0) } zAxis { sixDoFRigidBodyMotionConstraint axis; axis (0 0 1); } } restraints { verticalSpring { sixDoFRigidBodyMotionRestraint linearSpring; anchor (0 1.8 0); refAttachmentPt (0 0 0); stiffness 4000; damping 2; restLength 1.8; } } */ // ************************************************************************* // Thanks! |
|
October 12, 2019, 11:26 |
|
#2 |
New Member
Join Date: Sep 2019
Posts: 17
Rep Power: 6 |
To answer my own question, there is a good tutorial here:
http://www.tfd.chalmers.se/~hani/kur...eirsson/OF.pdf Though I had some issues with the code which I posted about here: OpenFOAM Immersed Boundary Method - forceBased motion class creation Additionally, this tutorial seems to encounter issues with the forces jumping sporadically.. believe this issue is due to the way the code uses loops. In my code, I implemented an "acceleration relaxation/damping" which sort of helps mitigate the sudden jumping, but I'm still working on getting it to run smoothly. |
|
November 22, 2021, 09:28 |
|
#3 |
New Member
Andrew Bickerdike
Join Date: Feb 2021
Posts: 6
Rep Power: 5 |
Hi,
Did you manage to get this code working? Thanks. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Solid body motion on boundary and not entire mesh | twinturbotom | OpenFOAM Running, Solving & CFD | 1 | June 5, 2020 07:02 |
Question about adaptive timestepping | Guille1811 | CFX | 25 | November 12, 2017 17:38 |
Difficulty in calculating angular velocity of Savonius turbine simulation | alfaruk | CFX | 14 | March 17, 2017 06:08 |
Drawing 3d body and immersed boundary method (IBM) | quarkz | Main CFD Forum | 0 | December 16, 2011 17:59 |
Immersed Boundary Ghost Cell Method | thehexman | Main CFD Forum | 1 | February 5, 2010 06:10 |