CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (http://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   How can I rotate this?: (http://www.cfd-online.com/Forums/openfoam-meshing/105662-how-can-i-rotate.html)

 A.A. August 6, 2012 04:15

How can I rotate this?:

1 Attachment(s)
I want to rotate some patches.

The big circle is a patch and the five smaller circles in the big circle are patches.
I want to rotate the big circle patch and the smaller circles with it. And also the smaller circle patches doing oscillating rotating motion.

How can I do this?

I am absolute beginner, so could you please explain in detail or give me an example.

Alex

 A.A. August 6, 2012 08:14

Hi,

when I try t to rotate first only the big circle by typing this:

dynamicFvMesh solidBodyMotionFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solidBodyMotionFvMeshCoeffs
{

solidBodyMotionFunction multiMotion;
multiMotionCoeffs
{
cellZone cyclorotor;
{
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
CofG (0 0 0);
}
}
}
}

the whole Mesh is rotating from what I can see in paraFoam

Q1) Is this the right function to do the motions describes above?
Q2) And if so what do I do wrong, because the entire Mesh is rotating?

Regards
Alex

 A.A. August 7, 2012 09:49

Hi,
does anybody know why with the above mentioned code, the whole Mesh is rotating but not only the chosen patch?

Please give me Ideas, did anybody have a similar problem?

If you wish I can send you the whole case to find the problems solution.

Alex

 wyldckat August 7, 2012 11:15

Greetings Alex,

A few questions:
1. What tutorial are you using as reference?
2. Which OpenFOAM version are you using?
3. What type of solver do you plan on using? MRF or GGI/AMI?
Best regards,
Bruno

 A.A. August 8, 2012 03:41

Hi Bruno,

Q1) I am using the OpenFOAM-2.01 /tutorials/multiphase/interDymFoam/ras/testTubeMixer/constant/dynamicMeshDict-file which I found in the internet which shows solidBodyMotionFunction multiMotion.

Q2) I am using OpenFOAM version 2.1.1.

Q3) I use solver pimpleDyMFoam to do solidBodyMotion.
I ve never heared of MRF or GGI/AMI

Regards,
Alex

 A.A. August 8, 2012 06:33

Hi Bruno,

you wrote something of AMI, so I tried to use the mixerVesselAMI2D tutorial in pimpleDyMFoam. I copied my blockMeshDict file in it and modified 0/p und 0/U also dynamicMeshDict file and ControlDict file. But I get the following error message:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.1-221db2718bbb
Exec : pimpleDyMFoam
Date : Aug 08 2012
Time : 12:31:06
Host : "ubuntu"
PID : 3118
Case : /home/gzabos/OpenFOAM/gzabos-2.1.1/run/tutorials/incompressible/pimpleDyMFoam/hybro3
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone cyclorotor
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh (Foam::IOobject const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libdynamicFvMesh.so"
#4 Foam::dynamicFvMesh::addIOobjectConstructorToTable <Foam::solidBodyMotionFvMesh>::New(Foam::IOobjec t const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libdynamicFvMesh.so"
#5 Foam::dynamicFvMesh::New(Foam::IOobject const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libdynamicFvMesh.so"
#6
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/pimpleDyMFoam"
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/pimpleDyMFoam"
Segmentation fault (core dumped)

I dont know what I am doing wrong, can you give me ideas or do you know what can be the reason for this error?

Regards,
Alex

 wyldckat August 8, 2012 08:40

Quote:
 Originally Posted by A.A. (Post 375993) I dont know what I am doing wrong, can you give me ideas or do you know what can be the reason for this error?
Quick answer: You took a bigger step than you should have! That's what you did wrong ;).

Given your experience, what you should do is to take smaller steps:
1. You should first study on how the tutorial works.
2. Then gradually modify the tutorial to get a feel on how things work.
3. Then simplify the mesh as much as possible, for understanding how things work. This mesh is generated using m4, which is a macro/scripting application, so you might want to try and understand how to do it with or without m4.
4. Only after you fully understand how the tutorial works and how you can modify it, only then you can/should start gradually implementing your mesh.
After your first successful implementation, only then you can start go around replacing meshes at your own will and desire :D

 A.A. August 8, 2012 08:56

Hi Bruno,

I have only this week left to get my case run. So I can't experiment much.
Could you please tell my how I can run this case and replace m4 mesh generation with my mesh.

Just give me something that I can run the case, its very urgent.
I also will follow your steps as far as I can go in these three days.

Alex

 wyldckat August 8, 2012 09:15

Hi Alex,

Sorry, but I'm busy as well this week and AMI is not a piece of cake. I suggest you try the sub-forum CFD Freelancers and request help there.

Best regards and good luck!
Bruno

 A.A. August 8, 2012 09:40

Ok

Thanks Bruno, I will try that.

Regards,
Alex

 stephie August 17, 2015 05:02

Hey,

at the moment I try to let my foil oscillate. Here I use at the moment the oscillatingRotatingMotion condition of OpenFOAM 2.3.1. I really would like to run this in foam extend 3.1

Do anyone know the equivalente condition for the foam extend version?
Until know I just found a condition for let it rotating and liner oscillating..I need rotatingoscillating.

I would be very grateful for anyones help.

Best regards,
Stephie

 wyldckat August 17, 2015 08:49

Quote:
 Originally Posted by stephie (Post 559839) Do anyone know the equivalente condition for the foam extend version? Until know I just found a condition for let it rotating and liner oscillating..I need rotatingoscillating.
Quick answer: There is a motion named SDA, exemplified in the tutorials "multiphase/interDyMFoam/ras/sloshingTank*". SDA stands for:
Quote:
 Source: http://sourceforge.net/p/openfoam-ex...tion/SDA/SDA.H Code: ```    Ship design analysis (SDA) 3DoF motion function.     Comprising sinusoidal roll (rotation about x), heave (z-translation)     and sway (y-translation) motions with changing amplitude and phase.``` Code: ```        //- Center of gravity         vector CofG_;         //- Model scale ratio         scalar lamda_;         //- Max roll amplitude [rad]         scalar rollAmax_;         //- Min roll amplitude [rad]         scalar rollAmin_;         //- Heave amplitude [m]         scalar heaveA_;         //- Sway amplitude [m]         scalar swayA_;         //- Damping Coefficient [-]         scalar Q_;         //- Time Period for liquid [sec]         scalar Tp_;         //- Natural Period of Ship [sec]         scalar Tpn_;         //- Reference time step [sec]         scalar dTi_;         //- Incr. in Tp/unit 'dTi'[-]         scalar dTp_;```
There is also another named SKA (Sea Keeping Analysis), which uses tables with values for the translations and rotations, instead of giving it the parameters for the functions: http://sourceforge.net/p/openfoam-ex...tion/SKA/SKA.H
Also available in "multiphase/interDyMFoam/ras/sloshingTank*", namely "sloshingTank3D6DoF".

 stephie August 18, 2015 05:19

Hello Bruno,

thank you for your quick answer. Yesterday I tried SDA, but unfortunately it isn't the condition I search. Today I will try your second hint.
I hope it is okay, if I ask you again.

Since last week I try to let my foil oscillate with the oscillatingrotatingmotion condition, but it doesn't move until now (OF 2.3.1). I am sorry, but I can't load an image.

I create my mesh with Salomé. It is a rectangular with a circel in the middel where the airfoil is located. I would like to oscillate the circle. Here I use cyclicAMI for the patches.

With theses commands:
Code:

```setSet -batch setBatch setsToZones -noFlipMap```
The setBatch file contains:
Code:

```faceSet Kreis_1_zone new patchToFace Kreis_1 //the outer orbital of the circel (80 cells) faceSet Kreis_2_zone new patchToFace Kreis_2 // the orbital where the circle is cut out (80 cells)```
In the dynamicMeshDict I defined the following things:

Code:

```dynamicFvMesh      solidBodyMotionFV; motionSolverLib      ( "libfvMotionSolver,so" ); solidBodyMotionFvMeshCoeffs { cellZone  front_1_extruded; soldBodyMotionFunction oscillatingRotatingMotion; oscillatingRotatingMotionCoeffs { origin (0.05 0 0); amplitude (0 0.0577 0); omega 5; //rad/s } }```
I used similar settings, when I tried rotationMotion and I works.

For teh solver I use pimpleDyMFoam in simple mode.

Might you imagine what I did wrong?

Thank you for your help again!
best regards,
Stephie

 wyldckat August 18, 2015 14:18

Quick answer: This reminds me of an example case I did sometime ago... this one: http://www.cfd-online.com/Forums/ope...tml#post513012 - post #60

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