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)

Scabbard March 7, 2014 14:01

oscillating cylinder dynamic mesh
 
Dear Foamers,

I just start to learn how to use openFoam and now I want to use the dynamic mesh to simulate a flow past an oscillating cylinder. However, for the dynamic mesh, I can only let the cylinder go one direction like the following dynamicMeshDict document.


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh solidBodyMotionFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solidBodyMotionFvMeshCoeffs
{
cellZone Fluid;

solidBodyMotionFunction linearMotion;
linearMotionCoeffs
{
velocity (0 -1 0);
}
}


// ************************************************** *********************** //

Could you tell me how to make the cylinder oscillating specifically in the flow?

Thank you so much for your help.

Maimouna March 24, 2014 09:53

Dear Scabbard

I just started working in free vibration of cylinder in the flow. Do you get idea how to work in the dynamic cylinder?

Scabbard March 24, 2014 11:39

Quote:

Originally Posted by Maimouna (Post 481790)
Dear Scabbard

I just started working in free vibration of cylinder in the flow. Do you get idea how to work in the dynamic cylinder?

Dear Maimouna

If you give more detail about your question, it will be better:)

I think you need add on pointDisplacement in your 0 docunment.

However, now I still could not run the case successful. Because it is always diverge. I do not know too much about pimplefoam...

Maimouna March 24, 2014 11:47

1 Attachment(s)
Many thanks for your reply.

I already finished the case about flow past a circular cylinder (case attached). Now I would like to make cylinder goes up and down. What are the changes I have to add to my case to get what I'm looking?

Any idea would be welcomed.

Scabbard March 24, 2014 12:03

Quote:

Originally Posted by Maimouna (Post 481812)
Many thanks for your reply.

I already finished the case about flow past a circular cylinder (case attached). Now I would like to make cylinder goes up and down. What are the changes I have to add to my case to get what I'm looking?

Any idea would be welcomed.

Dear Mainmouna,

I think you need to add on a piontDisplacement in your 0 document to define the cylinder's motion

Quote:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class pointVectorField;
object pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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 fixedValue;
value uniform (0 0 0);
}
bottom
{
type fixedValue;
value uniform (0 0 0);
}
walls
{
type zeroGradient;
}

cylinder
{
type oscillatingDisplacement;
amplitude (0.1 0 0);
omega 1;
value uniform (0 0 0);
}
}


// ************************************************** *********************** //
and in your constant floder, you need add on a dynamicMeshDict



However, I am not sure could it run successfully, but actually

cylinder
{
type oscillatingDisplacement;
amplitude (0.1 0 0);
omega 1;
value uniform (0 0 0);
}
is defining your cylinder's motions

Hope it help

Maimouna March 24, 2014 12:22

Many thanks. I will try that you post.

Maimouna March 25, 2014 05:29

Dear Scabbard,

just to make sure what's inside dynamicMeshDict file?


My dynamicMeshDict file is shown below
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.6                                  |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh  dynamicInkJetFvMesh;//dynamicMotionSolverFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

//solver          velocityComponentLaplacian;

//velocityComponentLaplacianCoeffs
//{
//    component      x;
//    diffusivity    directional ( 1 200 0 );
//}

dynamicInkJetFvMeshCoeffs
{
amplitude 0.1; //0.5;
frequency 1; //2;
refPlaneX 0;

}

// ************************************************************************* //

But the problem is it stopped at time 19 while the running still complete but never coming after that. It seems to me that is happened because of the divergence problem. Am I right? How could I solve my problem? Any help please...

Scabbard March 25, 2014 07:50

Dear Maimouna,

Sry my friend, I am still looking for the meaning of the dynamicMeshDict... If I got any idea, I will post on the forums.

Maimouna March 25, 2014 08:31

Many thanks. I'm looking forward your post.

If I got any I will post it too.

All the best

Maimouna March 25, 2014 10:16

1 Attachment(s)
Dear Bruno,

I was working in flow past a circular cylinder in OpenFOAM 2.2.2. I just finished my case (attached). Now, I'm looking for how to make that cylinder oscillate (up and down)?

What should I changed on my case for free vibration of cylinder in flow. I knew that I have to add pointDisplacement in 0 folder
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | foam-extend: Open Source CFD                    |
|  \\    /  O peration    | Version:  3.0                                  |
|  \\  /    A nd          | Web:        http://www.extend-project.de      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

FoamFile
{
version  2.0;
format    ascii;
class    pointVectorField;
object    pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 0 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
      inlet
{
    type fixedValue;
    value uniform (1 0 0);
}
    outlet
{
    type fixedValue;
    value uniform (0 0 0);
}
    top
{
    type empty;//fixedValue;
    //value uniform (0 0 0);
}
    bottom
{
    type empty;//fixedValue;
    //value uniform (0 0 0);
}
    walls
{
    type slip; //zeroGradient;
}

    cylinder
{
    type oscillatingDisplacement;
    amplitude (0.1 0 0);
    omega 1;
    value uniform (0 0 0);
}
}



// ************************************************************************* //

Is pointDisplacement file ok?

Also, I need to add dynamicMeshDict in constant folder. What's included?:confused:
Shall I changed my solver from pimpleFoam to pimpleDyMFoam?

Looking forward you help please

Maimouna April 1, 2014 07:45

Dear Scabbard,

did you get any idea about how making cylinder moving up and down? If any shearing me your idea please.

Maimouna April 2, 2014 11:27

1 Attachment(s)
Dear OF users,

I need your help please to give me hint of how to make cylinder oscillating in the attached case. I spent for that more than 3 weeks and I didn't get the result till today. So, I'm waiting your help my friends.

In that case:
- Mesh was generated by Gmsh.
- U = 1m/s^2, D= 1m, Re = 100.
- Other information in the attached folder.

I'm looking forward to get your help please.

wyldckat April 5, 2014 11:59

1 Attachment(s)
Greetings to all!

I don't have enough time today to look into this, but I think Maimouna is in the right track.

First of all, let me make a reference to the list of useful threads Maimouna had posted on and I then moved the posts to this thread, for keeping the topic in a single thread:

Let's see... the "pointDisplacement" is meant to be used by only a certain group of mesh motion solvers... If you look for "displacementMotionSolver" in the source code documentation page - http://foam.sourceforge.net/docs/cpp/ - you'll see that there are a few motion solvers that use the "pointDisplacement" field, as shown in the first attached image.
The candidates are:
  • displacementLaplacianFvMotionSolver
  • displacementSBRStressFvMotionSolver
  • sixDoFRigidBodyMotionSolver
Using the boundary condition that Maimouna is using in the "pointDisplacement" field, along with one of these motion solvers, should do the trick.
If we use this command:
Code:

find $FOAM_TUTORIALS -name dynamicMeshDict
it's possible to find all existing tutorials that have a "dynamicMeshDict" file.

In addition, you can use the moveDynamicMesh solver, which only moves the mesh and does not do any flow simulation. This is useful for figuring out how the mesh is moving along time.
Oh, and there was a thread that had a neat example case... where instead of a cylinder, it was a moving wall... actually, here's two:

Beyond this, I'll have to test things myself and that will take quite some time.

Best regards,
Bruno

Maimouna April 5, 2014 14:39

Dear Bruno,

many thanks for your post. I'm going to try what you post and I will post if any new result.

Waiting your trying as well.

Best regards

Scabbard April 11, 2014 14:25

Quote:

Originally Posted by Maimouna (Post 484046)
Dear Bruno,

many thanks for your post. I'm going to try what you post and I will post if any new result.

Waiting your trying as well.

Best regards

Dear Maimouna,

Sorry for the late reply, I am still try to get it oscillating, because I am simulating in turbulence so now still the programme can start run but can not converge always got error. so I am not sure now... Sorry

Hope you have already solve the problem.

Best wishes

Maimouna April 11, 2014 17:38

Dear Scabbard,

yes, I solve my oscillating problem in laminar flow for forced vibration but not in natural vibration. I'm still working to get the result to make comparison between both. Once finished, I'm going to post them both.

All the best.

Maimouna

Kind regards

Mojtaba.a April 12, 2014 09:49

Hello all,
I hope you have a good day.
I am trying to simulate the same thing.
Dear Maimounda, by natural vibration of the cylinder, you mean the vortex induced vibrations causing cylinder to oscillate?

With all the best,
Mojtaba

Maimouna April 12, 2014 12:11

Dear Mojtaba,

exactly, in the natural vibration don't need to specify a motion for the cylinder. Let the cylinder (within certain constraints) move accordingly to how the forces caused by the fluid act on it.

The difference between forced and natural vibrations is essentially the boundary condition on the cylinder in pointDisplacement file in 0 directory.

I hope that help.

Maimouna

jherb April 17, 2014 08:19

I think you are looking for "fluid solid interaction" simulations using OpenFOAM. Googling for it, here are some links I found:
http://www.cfd-online.com/Forums/ope...-openfoam.html
http://openfoam-extend.sourceforge.n...re_Interaction
http://training.uhem.itu.edu.tr/file...50927-file.pdf
http://www.personal.psu.edu/rlc138/r...ell_thesis.pdf

At them moment, it looks like it is not supported in standard OpenFOAM but in the extended project.

Scabbard April 19, 2014 09:06

Quote:

Originally Posted by jherb (Post 486708)
I think you are looking for "fluid solid interaction" simulations using OpenFOAM. Googling for it, here are some links I found:
http://www.cfd-online.com/Forums/ope...-openfoam.html
http://openfoam-extend.sourceforge.n...re_Interaction
http://training.uhem.itu.edu.tr/file...50927-file.pdf
http://www.personal.psu.edu/rlc138/r...ell_thesis.pdf

At them moment, it looks like it is not supported in standard OpenFOAM but in the extended project.

Thank you so much for your help.

petr.f. April 29, 2014 13:07

I'd say there is FSI in the standard version - take a look at $FOAM_TUTORIALS//incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam

... or do I get something wrong?

wyldckat May 1, 2014 09:15

Greetings Petr,

Quote:

Originally Posted by petr.f. (Post 488963)
I'd say there is FSI in the standard version

FSI has a more broad approach, where it allows for solid shapes to deform depending on the interaction with fluids.
That particular tutorial only relies on a rigid-solid approach (it's named "sixDoFRigidBodyMotion" in "constant/dynamicMeshDict"), which means that even though the fluid may move the solid, said solid will not change its own shape.

The difficulty with FSI itself is usually with the solid deformation using an FVM (Finite Volume Method) approach, instead of the conventional FEM (Finite Element Method), as a reflex to the interaction of forces made by the fluid on the solid.

Best regards,
Bruno

Maimouna May 1, 2014 09:33

1 Attachment(s)
Dear Bruno,

many thanks for your clarification.

I have question about my case. I already finished forced oscillation of circular cylinder (case attached). Now, I have been stuck in applying the natural vibration of my case. I tried to use wingMotion as a reference, but I didn't get the result. could you help me how to apply natural (free) vibration. I knew that I have to do some changes in pointDisplacement file referring to wingMotion test case. But unfortunately, I'm still stucking on that because I lake of information of different fields in pointDisplacement file in wingMotion folder.

Many thanks in advanced. Looking forward to get your answer.

Maimouna

petr.f. May 2, 2014 12:08

Hi Bruno - that's what I've meant, just a simple case of FSI. Anyway - I haven't check the extend version, are they using FVM or FEM for structural deformations?

wyldckat May 3, 2014 09:46

Greetings to all!

@Maimouna:
Quote:

Originally Posted by Maimouna (Post 489299)
could you help me how to apply natural (free) vibration. I knew that I have to do some changes in pointDisplacement file referring to wingMotion test case. But unfortunately, I'm still stucking on that because I lake of information of different fields in pointDisplacement file in wingMotion folder.

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:
Quote:

Originally Posted by petr.f. (Post 489514)
Hi Bruno - that's what I've meant, just a simple case of FSI. Anyway - I haven't check the extend version, are they using FVM or FEM for structural deformations?

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

Maimouna May 7, 2014 11:32

Quote:

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.

Dear Bruno,

I'm looking at case number 2, but this is not force. Any idea please?

Many thanks in advanced.

karamiag May 22, 2014 12:30

Hi ok,
I downloaded your oscillating cylinder case, but I am not able to make the cylinder move. Could you please give more details about how to launch the case?
Thank you.

Maimouna May 22, 2014 12:35

Quote:

Hi ok,
I downloaded your oscillating cylinder case, but I am not able to make the cylinder move. Could you please give more details about how to launch the case?
Thank you.
Hi,

the cylinder oscillates properly in my OpenFOAM versions (2.2.2 and 2.3.0).

Which OF version do you use?

karamiag May 22, 2014 12:37

I am using OpenFOAM version 2.3.0. In particular I have not found any information in your case about oscillation frequency or amplitude.

Maimouna May 22, 2014 12:42

Strange:confused:
I just tried now to make sure. It's working. Did you use pimpleDyMFoam solver?

karamiag May 22, 2014 12:48

This is what I have done.
tar xf oscillatingCylinder.tar.gz
cd oscillatingCylinder
blockMesh
pimpleDyMFoam
And this is what I obtain.

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.3.0
Exec : pimpleDyMFoam
Date : May 22 2014
Time : 19:44:06
Host : "ljjjjjkllkjl"
PID : 21970
Case : /home/tesisti/OpenFOAM/tesisti-2.3.0/run/oscillatingCylinder
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 staticFvMesh


--> FOAM FATAL IO ERROR:
keyword PIMPLE is undefined in dictionary "/home/tesisti/OpenFOAM/tesisti-2.3.0/run/oscillatingCylinder/system/fvSolution"

file: /home/tesisti/OpenFOAM/tesisti-2.3.0/run/oscillatingCylinder/system/fvSolution from line 23 to line 74.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 643.

FOAM exiting

Maimouna May 22, 2014 12:55

This is the steps:
1. Extract tar xf oscillatingCylinder.tar.gz
2. Copy and paste in pimpleDyMFoam solver in incomressible tutorial
3. In terminal window alias 'of230'
4. Go to the case path.
5. ./Allclean
6. ./Allprepare
7. pimpleDyMFoam
8. paraFoam

Hope this help.

Regards

karamiag May 22, 2014 13:01

Extracting oscillatingCylinder.tar.gz I obtain a directory in which there is no Allclean or Allprepare file. Is it possible the targz file you uploaded is the wrong one?

Maimouna May 22, 2014 15:00

1 Attachment(s)
Try this one. I hope it will help.

All the best

karamiag May 23, 2014 02:36

OK, now it works!
Thank you.

wyldckat June 15, 2014 12:05

Greetings to all!

@Maimouna:
Quote:

Originally Posted by Maimouna (Post 490423)
I'm looking at case number 2, but this is not force. Any idea please?

Sorry, time has been flying past me and only now did I manage to give a quick look into this. I see that you've continued to look into this and that you've found this thread: http://www.cfd-online.com/Forums/ope...tion-6dof.html

Essentially that thread does point in the right direction. My suggestion is that you also look into the tutorial case "multiphase/interDyMFoam/ras/floatingObject", comparing the versions on OpenFOAM 2.1, 2.2 and 2.3, because it has evolved over time. The idea in that case is that the floating body is moving due to impulsion of the fluid vs body density.

There is another example case... let's see if I can find it... ah, it's this thread: http://www.cfd-online.com/Forums/ope...opofvmesh.html - that example was for a sphere that was moving inside a tube towards a hole. The detail in this thread is that it uses a specific dynamic motion library, namely this one: https://github.com/smenon/dynamicTopoFvMesh

Best regards,
Bruno

Maimouna June 16, 2014 06:14

Dear Bruno,

many thanks for your post. But, I'm still confusing how to implement that in the cylinder case. Have I create a new solver or my case? What is the exactly steps to get the result that I'm looking.

I'm really need some help. I lack of these technical steps.

Many thanks in advanced.

Maimouna

Scabbard June 16, 2014 06:27

Quote:

Originally Posted by Maimouna (Post 497193)
Dear Bruno,

many thanks for your post. But, I'm still confusing how to implement that in the cylinder case. Have I create a new solver or my case? What is the exactly steps to get the result that I'm looking.

I'm really need some help. I lack of these technical steps.

Many thanks in advanced.

Maimouna

Hi Maimouna,

I have already make the case running use the sixDoFRigidBodyMotion solver, for me I looked at the WingMotions in the tutorials. For now, I just make it successfully run but have not make the validation of the result. If you need any help, may be I can help you with this case.

Scabbard

Scabbard June 16, 2014 06:31

Quote:

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

@Maimouna:

Sorry, time has been flying past me and only now did I manage to give a quick look into this. I see that you've continued to look into this and that you've found this thread: http://www.cfd-online.com/Forums/ope...tion-6dof.html

Essentially that thread does point in the right direction. My suggestion is that you also look into the tutorial case "multiphase/interDyMFoam/ras/floatingObject", comparing the versions on OpenFOAM 2.1, 2.2 and 2.3, because it has evolved over time. The idea in that case is that the floating body is moving due to impulsion of the fluid vs body density.

There is another example case... let's see if I can find it... ah, it's this thread: http://www.cfd-online.com/Forums/ope...opofvmesh.html - that example was for a sphere that was moving inside a tube towards a hole. The detail in this thread is that it uses a specific dynamic motion library, namely this one: https://github.com/smenon/dynamicTopoFvMesh

Best regards,
Bruno

Dear Bruno,

Thanks for your keeping help. Now I want to record the trajectory of the cylinder's motion response, the centre of the cylinder displacement. Is there any function in the OpenFoam can do this? Thank you.

Best wishes,
Scabbard

Maimouna June 16, 2014 07:37

Quote:

Hi Maimouna,

I have already make the case running use the sixDoFRigidBodyMotion solver, for me I looked at the WingMotions in the tutorials. For now, I just make it successfully run but have not make the validation of the result. If you need any help, may be I can help you with this case.

Scabbard
Hi Scabbard,

of course, I need your help. I'm struggling on that for long time. If you don't mind please we can shear your idea and I would be really grateful.

My email address is: may78may@hotmail.com

Best regards
Maimouna


All times are GMT -4. The time now is 18:36.