CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   oscillating cylinder dynamic mesh (https://www.cfd-online.com/Forums/openfoam-pre-processing/131044-oscillating-cylinder-dynamic-mesh.html)

llib11ik December 14, 2015 01:05

Thanks, Maimouna!

Look forward to your reply!

Best regards
Jason

Quote:

Originally Posted by Maimouna (Post 577205)
Dear Jason,
I'm away from my Ubuntu machine now. Give me some days then I'll back to you.

All the best.

Maimouna


Maimouna December 14, 2015 09:04

Code:

1. Follow your method below, I can only get the x of the mass center. Do you know how to get all x y z?
2. For the attached case, I can find the cylinder is moving, but  velocity and displacement are very small (the order is e-6 to e-9). I  tried to change the mass, stiffness and damping but none of them works.  Can you give me suggestions to make the cylinder move more obviously?

Dear Jason,

1. As posted, I'm still not sure if there is a way to get all components. Might there is some expertises could help me, you and others.

2. Try one by the time, I mean try to change mass first, if doesn't work change stiffness and then damping or what ever you would like to begin with.

Honestly, I don't have time to test that with you, so try them and let me know if that work or not.

Just in case getting time in the next few days, send me your case study problem (domain, BCs, Re, all possible information) to have a look.

All the best

Maimouna

Maimouna December 14, 2015 09:31

Code:

1. Follow your method below, I can only get the x of the mass center. Do you know how to get all x y z?
Following the last post, There is such good news for your first question :). I tried the following using Gnuplot and it works in my log file

Code:

set title "Centre of Mass"
set ylabel 'Centre of Mass'
set xlabel 'Iteration'
set yrange [-3:4.1]
plot"< cat log | grep 'of mass' | cut -d' ' -f5 | tr -d ' '" every::::1000 title 'Centre of Mass (y)' with lines,\
    "< cat log | grep 'of mass' | cut -d'(' -f2 | tr -d ' '" every::::1000 title 'Centre of Mass (x)' with lines,\
    "< cat log | grep 'of mass' | cut -d' ' -f6 | tr -d ')'" every::::1000 title 'Centre of Mass (z)' with lines
pause 1
set terminal jpeg
set output 'Centre of Mass.jpeg'
reread
replot

Try that, it will work.

Kind regards

Maimouna

llib11ik December 15, 2015 02:21

Thanks, Maimouna! That's a great help!

Regards
Jason

Quote:

Originally Posted by Maimouna (Post 577537)
Code:

1. Follow your method below, I can only get the x of the mass center. Do you know how to get all x y z?
Following the last post, There is such good news for your first question :). I tried the following using Gnuplot and it works in my log file

Code:

set title "Centre of Mass"
set ylabel 'Centre of Mass'
set xlabel 'Iteration'
set yrange [-3:4.1]
plot"< cat log | grep 'of mass' | cut -d' ' -f5 | tr -d ' '" every::::1000 title 'Centre of Mass (y)' with lines,\
    "< cat log | grep 'of mass' | cut -d'(' -f2 | tr -d ' '" every::::1000 title 'Centre of Mass (x)' with lines,\
    "< cat log | grep 'of mass' | cut -d' ' -f6 | tr -d ')'" every::::1000 title 'Centre of Mass (z)' with lines
pause 1
set terminal jpeg
set output 'Centre of Mass.jpeg'
reread
replot

Try that, it will work.

Kind regards

Maimouna


kkpal December 20, 2015 23:43

oscillating cylinder dynamic mesh
 
Have someone tried 2nd order temporal accuracy in the vortex induced vibration cases? The wingMotion tutorial used Euler, which is a first order ddtScheme. In my VIV around a circular cylinder case, when I change it to a 2nd order accurate backward, the computation diverged!

JNSN December 21, 2015 07:54

Short answer: yes

agnip December 21, 2015 09:14

no damping effects in free decay test
 
Hi everybody!
I'm simulating free decay tests of a vertical floating cylinder in OF 2.3.0, with interDyMFoam. The cylinder is moored to the bottom with four linear springs.
it works, but it seems to be not realistic, because the motion is almost not dampened.
Did anybody work on this topic? can you suggest me the reason or the way to solve the problem?

Thank you very very much in advance.

Agnese

kkpal December 21, 2015 09:44

Hi, Jan!
Did you manage to solve this problem of divergence with second order temporal scheme?
Quote:

Originally Posted by JNSN (Post 578347)
Short answer: yes


llib11ik January 19, 2016 23:44

Quote:

Originally Posted by kkpal (Post 578301)
Have someone tried 2nd order temporal accuracy in the vortex induced vibration cases? The wingMotion tutorial used Euler, which is a first order ddtScheme. In my VIV around a circular cylinder case, when I change it to a 2nd order accurate backward, the computation diverged!

Hi kkpal,

Can you upload your case file so that we can have a discuss?

xjokjok May 17, 2016 20:21

where is the aerodynamics coefficients implemented?
 
Hi everyone!! I am new in this forum, because I am trying to learn OpenFoam, and I find this information very useful to my case, so thank you to all.

Well, I am reading and practice this example using gmsh to mesh and trying to get something good, but i have a question, Where is implemented all the aerodynamics coefficients?

Because I have seen how this example give me some drag coefficients and lift coefficients , but i don't know how I can use to another case. So where is the lift, in the fvSolution and fvSchemes?

Thank you in advance for any help you can give!

Xjokjok

Bazinga May 18, 2016 01:32

Quote:

Originally Posted by xjokjok (Post 600468)
Hi everyone!! I am new in this forum, because I am trying to learn OpenFoam, and I find this information very useful to my case, so thank you to all.

Well, I am reading and practice this example using gmsh to mesh and trying to get something good, but i have a question, Where is implemented all the aerodynamics coefficients?

Because I have seen how this example give me some drag coefficients and lift coefficients , but i don't know how I can use to another case. So where is the lift, in the fvSolution and fvSchemes?

Thank you in advance for any help you can give!

Xjokjok

The information about the aerodynamic values in defined in the controlDict file.

xjokjok May 18, 2016 12:48

Quote:

Originally Posted by Bazinga (Post 600494)
The information about the aerodynamic values in defined in the controlDict file.

ok, thanks you much, I didn't see. I appreciate you reply! :)

xjokjok

llib11ik May 19, 2016 03:37

Hi

Lift and drag coefficients should be output from the calculation of OpenFOAM, not the input.

For input, such as stiffness, damping, they are defined in dynamicMeshDict file in constant folder.

Quote:

Originally Posted by xjokjok (Post 600468)
Hi everyone!! I am new in this forum, because I am trying to learn OpenFoam, and I find this information very useful to my case, so thank you to all.

Well, I am reading and practice this example using gmsh to mesh and trying to get something good, but i have a question, Where is implemented all the aerodynamics coefficients?

Because I have seen how this example give me some drag coefficients and lift coefficients , but i don't know how I can use to another case. So where is the lift, in the fvSolution and fvSchemes?

Thank you in advance for any help you can give!

Xjokjok


Divyaprakash July 8, 2016 03:51

Quote:

Originally Posted by Pab (Post 558836)
Hi all,


Anybody knows where can I find simulation or experimental data to validate a case of 2D spring mounted laminar cylinder with 1DOF, and 2DOF too? For example, Cl(t) and Cd(t) for low Re, around 200.

Thanks you in advance. Best regards,


Pablo

Hi Pablo,

I too am in need of a validation case to validate my model in openfoam. Did you have any luck with it? Can you help me out too?

CataV September 6, 2016 11:13

Doubts about report 6-DoF
 
1 Attachment(s)
Hi everyone,
I've been working with free cylinder in an oscillating flow. I'm using 6-DoF rigid body motion with transverse direction of flow (y) allow to move. No matter what I do, the log file not contains information about 6-DoF such as centre of mass that I need to capture the movement. I put on the report and the reportToFile too but nothing.
I using openFOAM 2.4, ubuntu 14.04 LTS. Then I installed openFOAM 3.0 to try to overcome the error. But nothing change :(

I will be very grateful with your help.
Best regards

dynamicMeshDict file:
Code:

dynamicFvMesh      dynamicMotionSolverFvMesh;

motionSolverLibs
(
"libsixDoFRigidBodyMotionDev.so"
"libfvMotionSolvers.so"
);

solver            sixDoFRigidBodyMotion;

sixDoFRigidBodyMotionCoeffs
{
            patches                (cylinder);
            //innerDistance  0.008;
            //outerDistance  0.01;
        mass            10;
        centreOfMass    (0 0 0);
        momentOfInertia (6.4e-04 6.4e-04 1.28e-03);
        orientation
        (
            1 0 0
            0 1 0
            0 0 1
        );
        velocity          (0 0 0);
        acceleration    (0 0 0);
        angularMomentum (0 0 0);
        torque            (0 0 0);
        rhoName        rhoInf;
        rhoInf            1;
        g                    (0 0 -9.81);
        report              on;
        reportToFile      on;
        constraints
        {
            maxIterations  500;

          Line
            {
                sixDoFRigidBodyMotionConstraint line;
                    direction          (0 1 0);
            }

            /*DontMoveOverZ
            {
                sixDoFRigidBodyMotionConstraint axis;
                axis        (0 0 1);
            }*/
        }
        restraints
        {
            S2
            {
                sixDoFRigidBodyMotionRestraint linearSpring;

                linearSpringCoeffs
                {
                    anchor          (0 0.01 0);
                    refAttachmentPt (0 0 0);
                    stiffness        2;
                    damping        0;
                    restLength      0.01;
                }
            }
           
        }
}

pointDisplacement file:
Code:

dimensions [0 1 0 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
    inlet
        {
                    type fixedValue;
                    value uniform (0 0 0);
        }
    outlet
        {
                    type fixedValue;
                    value uniform (0 0 0);
        }
    top
        {
                    type empty;
        }
    bottom
        {
                    type empty;
        }       
    frontAndBack
        {
                    type empty;
        }
    cylinder
        {
                type calculated;       
        }

}

For Re=1000 and D=0,016
Attachment 50314

arionfard September 6, 2016 12:09

Quote:

Originally Posted by CataV (Post 616812)
Hi everyone,
I've been working with free cylinder in a oscillating flow. I using 6-DoF rigid body motion with transverse direction of flow (y) allow to move. No matter what I do, the log file not contains information about 6-DoF such as centre of mass that I need to capture the movement. I put on the report and the reportToFile too but nothing.
I using openFOAM 2.4, ubuntu 14.04 LTS. Then I installed openFOAM 3.0 to try to overcome the error. But nothing change :(

I will be very grateful with your help.
Best regards

dynamicMeshDict file:
Code:

dynamicFvMesh      dynamicMotionSolverFvMesh;

motionSolverLibs
(
"libsixDoFRigidBodyMotionDev.so"
"libfvMotionSolvers.so"
);

solver            sixDoFRigidBodyMotion;

sixDoFRigidBodyMotionCoeffs
{
            patches                (cylinder);
            //innerDistance  0.008;
            //outerDistance  0.01;
        mass            10;
        centreOfMass    (0 0 0);
        momentOfInertia (6.4e-04 6.4e-04 1.28e-03);
        orientation
        (
            1 0 0
            0 1 0
            0 0 1
        );
        velocity          (0 0 0);
        acceleration    (0 0 0);
        angularMomentum (0 0 0);
        torque            (0 0 0);
        rhoName        rhoInf;
        rhoInf            1;
        g                    (0 0 -9.81);
        report              on;
        reportToFile      on;
        constraints
        {
            maxIterations  500;

          Line
            {
                sixDoFRigidBodyMotionConstraint line;
                    direction          (0 1 0);
            }

            /*DontMoveOverZ
            {
                sixDoFRigidBodyMotionConstraint axis;
                axis        (0 0 1);
            }*/
        }
        restraints
        {
            S2
            {
                sixDoFRigidBodyMotionRestraint linearSpring;

                linearSpringCoeffs
                {
                    anchor          (0 0.01 0);
                    refAttachmentPt (0 0 0);
                    stiffness        2;
                    damping        0;
                    restLength      0.01;
                }
            }
           
        }
}

pointDisplacement file:
Code:

dimensions [0 1 0 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
    inlet
        {
                    type fixedValue;
                    value uniform (0 0 0);
        }
    outlet
        {
                    type fixedValue;
                    value uniform (0 0 0);
        }
    top
        {
                    type empty;
        }
    bottom
        {
                    type empty;
        }       
    frontAndBack
        {
                    type empty;
        }
    cylinder
        {
                type calculated;       
        }

}

For Re=1000 and D=0,016
Attachment 50314

Attach the log file .Allrun file and the whole case.

CataV September 6, 2016 17:21

Hello Behzad
Many thanks to replay. You can find 2 attachments bellow, with openFOAM 2.4:
https://drive.google.com/folderview?...ms&usp=sharing

1. oscillating_1000_1: the dynamicMeshDict file has a sixDoFRigidBodyMotion as the solver and the sixDoFRigidBodyMotionCoeffs are presented here.

2. oscillating_1000_2: the pointdisplacement file has the sixDoFRigidBodyMotionCoeffs and dynamicMeshDict has a displacementLaplacian as the solver.

I tried to use both ways that I found in some forums and I changed thinks like mass, stiffness and restLength but the movement of the cylinder is not displayed and there isn't 6-DoF data information in log file.
I'll be waiting for any idea to solve my problem

Thanks...

arionfard September 6, 2016 23:59

Quote:

Originally Posted by CataV (Post 616854)
Hello Behzad
Many thanks to replay. You can find 2 attachments bellow, with openFOAM 2.4:
https://drive.google.com/folderview?...ms&usp=sharing

1. oscillating_1000_1: the dynamicMeshDict file has a sixDoFRigidBodyMotion as the solver and the sixDoFRigidBodyMotionCoeffs are presented here.

2. oscillating_1000_2: the pointdisplacement file has the sixDoFRigidBodyMotionCoeffs and dynamicMeshDict has a displacementLaplacian as the solver.

I tried to use both ways that I found in some forums and I changed thinks like mass, stiffness and restLength but the movement of the cylinder is not displayed and there isn't 6-DoF data information in log file.
I'll be waiting for any idea to solve my problem

Thanks...

I changed some keywords in pointdisplacement and dynamicMeshDict and left comment there.
https://drive.google.com/file/d/0B5M...ew?usp=sharing

sachinthakre September 7, 2016 05:24

Quote:

Originally Posted by wyldckat (Post 489604)
Greetings to all!

@Maimouna:

You'll have to be more specific on what exactly you want to do, because I can think of several kinds of natural vibrations for such a situation:
  1. A natural vibration occurring in the fluid (ripple effect?).
  2. The fluid inducing a natural vibration on the solid cylinder (force driven?).
  3. Moving the cylinder at a previously known natural vibration frequency.
  4. Structure deformation/destruction caused by reaching a natural vibration.
@Petr:

FSI stands for Fluid-Structure Interaction. It's briefly explained here: http://www.foamcfd.org/development.html

The "simple case of FSI" you're referring to would be Fluid-Solid Interaction... which is not the specific reason why the acronym "FSI" was created ;). More specifically, what you're referring to is usually addressed as dynamic meshing, as the changes that are made to the geometrical boundaries will enforce changes on the mesh, or vice versa.

According to the description on that page I gave the link above, the structure side is performed using FEM in foam-extend, which currently is no yet operational in the official OpenFOAM version.

Best regards,
Bruno

Dear Bruno and others,

Similar to the discussions in this thread, I am simulating the cube shaped object vibrating along only one axis (oscillating)in water. I used linearSpring. I can successfully make it vibrate (free vibrations without damping) at its natural frequency (calculated from stiffness and mass), and validated with the analytical calculations.
Now I want to add an external force so that the object will vibrate at various frequencies other than its natural frequency.

One attempt: I tried to modify restraintforce equation in the linearSpring.C file, by adding the external force term F0*sin(wt), but it didn't work may be because I couldn't add "time, t" in there.

What do you suggest to solve this problem?

Many thanks in advance.

Best regards,
Sachin

CataV September 8, 2016 23:23

Quote:

Originally Posted by arionfard (Post 616867)
I changed some keywords in pointdisplacement and dynamicMeshDict and left comment there.
https://drive.google.com/file/d/0B5M...ew?usp=sharing

Hello Behzad
Thank you very much for your help. I saw your changes, comments and log file. Everything seems to be good. So I proved the model that you send me and the log file doesn't show any information about 6-DoF or mass center. Maybe there is a problem with the OF instalation or some libraries are missing, I don't know :(

For installing OF I used this link https://openfoamwiki.net/index.php/I...M-2.4.0/Ubuntu for Ubuntu 14.04 and install from source

For running I generat the mesh with "blockMesh" and then I enter the command line "pimpleFoam"

I'll be waiting for a comment

Thanks again


All times are GMT -4. The time now is 00:14.