CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

HronTurekFsi3 foam-extend3.1

Register Blogs Community New Posts Updated Threads Search

Like Tree15Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 5, 2015, 07:45
Default
  #1
Senior Member
 
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 13
Maimouna is on a distinguished road
Dear Bruno,

I'm using your FSI library in foam-extend3.1, fsiFoam solver, in order to get the solution for 2d and 3d case of of the elastic cantilever attached to a square bluff body. I already get the solution for 2d case, now, I'm working for 3d case. I need to use extrude2dMesh utility in order to change from 2d to 3d. Is that possible? If yes, could you please send me steps how to apply that.

Many thanks in advanced and regards.

Maimouna
Maimouna is offline   Reply With Quote

Old   November 8, 2015, 14:46
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: http://www.cfd-online.com/Forums/ope...-not-work.html
wyldckat is offline   Reply With Quote

Old   November 9, 2015, 06:29
Default
  #3
Senior Member
 
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 13
Maimouna is on a distinguished road
Dear Bruno,

I tried what people posted in http://www.cfd-online.com/Forums/ope...-not-work.html. My extrude2DMeshDict in system directory is
Quote:
/*--------------------------------*- 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 dictionary;
object extrude2DMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


extrudeModel linearDirection;

patchType empty;

nLayers 1;

expansionRatio 1.0;

linearDirectionCoeffs
{
direction (0 0 1);
thickness 0.01;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
then, run extrude2DMesh polyMesh2D, the error that got is shown in the terminal results here
Quote:
owner@owner-HP-Pavilion-Sleekbook-15-PC:~/foam/owner-3.1/FluidStructureInteraction/run/fsiFoam/myCylinderCase-FsiLinear3dExtrude/fluid$ extrude2DMesh polyMesh2D
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.1 |
| \\ / A nd | Web: http://www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 3.1-f61aab88e799
Exec : extrude2DMesh polyMesh2D
Date : Nov 09 2015
Time : 11:21:05
Host : owner-HP-Pavilion-Sleekbook-15-PC
PID : 3396
CtrlDict : /home/owner/foam/foam-extend-3.1/etc/controlDict
Case : /home/owner/foam/owner-3.1/FluidStructureInteraction/run/fsiFoam/myCylinderCase-FsiLinear3dExtrude/fluid
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create polyMesh for time = 0



--> FOAM FATAL IO ERROR:
wrong token type - expected Scalar found on line 0 the word 'polyMesh2D'

file: IStringStream.sourceFile at line 0.

From function operator>>(Istream&, Scalar&)
in file lnInclude/Scalar.C at line 85.

FOAM exiting

owner@owner-HP-Pavilion-Sleekbook-15-PC:~/foam/owner-3.1/FluidStructureInteraction/run/fsiFoam/myCylinderCase-FsiLinear3dExtrude/fluid$

Note that, I add the same extrude2DMeshDict file for both fluid and solid directories.

Best regards
Maimouna is offline   Reply With Quote

Old   November 15, 2015, 14:53
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Maimouna,

Sorry, I didn't have time to test and to take a better look at this the other day. The first problem is that the thread I mentioned is for OpenFOAM 2.2, which has a considerably different extrude2DMesh application from the one in foam-extend 3.1.

Looks like extrude2dMesh is not what you are looking for. extrudeMesh does what you want:
  1. I had to first modify the file "blockMeshDict" and separate the "front" and "back" patches, now named "frontPlane" and "backPlane".
  2. Then I copied the file "extrudeProperties" from the folder "$FOAM_UTILITIES/mesh/generation/extrudeMesh", into the "fluid/constant" folder.
  3. I then modified the content to this:
    Code:
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | foam-extend: Open Source CFD                    |
    |  \\    /   O peration     | Version:     3.1                                |
    |   \\  /    A nd           | Web:         http://www.extend-project.de       |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      extrudeProperties;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    // Where to get surface from: either from surface ('surface') or
    // from (flipped) patch of existing case ('patch')
    constructFrom patch;    //surface;
    
    // If construct from (flipped) patch
    sourceCase "$FOAM_CASE";
    sourcePatch frontPlane;
    
    // Flip surface normals before usage.
    flipNormals false;
    
    // If construct from surface
    //surface "movingWall.sMesh";
    
    
    // Do front and back need to be merged? Usually only makes sense for 360
    // degree wedges.
    mergeFaces false;
    
    
    //- Linear extrusion in point-normal direction
    extrudeModel        linearNormal;
    
    nLayers             20;
    
    linearNormalCoeffs
    {
        thickness       1.0;
    }
    
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
  4. Then I ran:
    Code:
    blockMesh
    extrudeMesh
    But it didn't give the exact result I was hoping for.

But then I though a bit better and I have to ask: Why are you trying to complicate this, when you can simply modify the two "blockMeshDict" files and change the Z position values and increase the mesh refinement along that direction?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 19, 2015, 07:06
Default
  #5
Senior Member
 
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 13
Maimouna is on a distinguished road
Dear Bruno,

many thanks for your last post. I tried your both suggestion

Code:
I had to first modify the file  "blockMeshDict" and separate the "front" and "back" patches, now named  "frontPlane" and "backPlane".
Then I copied the file "extrudeProperties" from the folder "$FOAM_UTILITIES/mesh/generation/extrudeMesh", into the "fluid/constant" folder.
I then modified the content to this:

Code:
 /*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | foam-extend: Open Source CFD                    |
|  \\    /   O peration     | Version:     3.1                                |
|   \\  /    A nd           | Web:         http://www.extend-project.de       |
|    \\/     M anipulation  |                                                 | \*---------------------------------------------------------------------------*/
FoamFile
{
     version     2.0;
     format      ascii;
     class       dictionary;
     object      extrudeProperties;
}

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

// Where to get surface from: either from surface ('surface') or
// from (flipped) patch of existing case ('patch')
constructFrom patch; //surface;

// If construct from (flipped) patch
sourceCase "$FOAM_CASE";
sourcePatch frontPlane;

// Flip surface normals before usage.
flipNormals false;
// If construct from surface
//surface "movingWall.sMesh";

// Do front and back need to be merged? Usually only makes sense for 360
// degree wedges.
mergeFaces false;

//- Linear extrusion in point-normal direction
extrudeModel        linearNormal;
nLayers             20;

linearNormalCoeffs
{
     thickness       1.0;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Then I ran:
Code:
blockMesh extrudeMesh
But it didn't give the exact result I was hoping for.

also, I didn't find what I hope. ExtrudeMesh utility give me this error
Code:
owner@owner-HP-Pavilion-Sleekbook-15-PC:~/foam/owner-3.1/FluidStructureInteraction/run/fsiFoam/myCylinderCase-FsiLinear3dExtrude/fluid$ extrudeMesh 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | foam-extend: Open Source CFD                    |
|  \\    /   O peration     | Version:     3.1                                |
|   \\  /    A nd           | Web:         http://www.extend-project.de       |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build    : 3.1-f61aab88e799
Exec     : extrudeMesh
Date     : Nov 19 2015
Time     : 11:45:24
Host     : owner-HP-Pavilion-Sleekbook-15-PC
PID      : 4044
CtrlDict : /home/owner/foam/foam-extend-3.1/etc/controlDict
Case     : /home/owner/foam/owner-3.1/FluidStructureInteraction/run/fsiFoam/myCylinderCase-FsiLinear3dExtrude/fluid
nProcs   : 1
SigFpe   : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Selecting extrudeModel linearNormal
Extruding patch frontPlane on mesh "/home/owner/foam/owner-3.1/FluidStructureInteraction/run/fsiFoam/myCylinderCase-FsiLinear3dExtrude/fluid"

Create polyMesh for time = 0



--> FOAM FATAL ERROR: 
Cannot find patch frontPlane in the source mesh.
Valid patch names are 
3
(
sides
originalPatch
otherSide
)


    From function extrudeMesh
    in file extrudeMesh.C at line 105.

FOAM exiting

owner@owner-HP-Pavilion-Sleekbook-15-PC:~/foam/owner-3.1/FluidStructureInteraction/run/fsiFoam/myCylinderCase-FsiLinear3dExtrude/fluid$
That tells frontPlane is a wrong patch name. Any idea to prevent that?

The second suggestion

Code:
But then I though a bit better and I have to ask: Why are you trying to  complicate this, when you can simply modify the two "blockMeshDict"  files and change the Z position values and increase the mesh refinement  along that direction?
I tried that, it is running but the beam is not moving. My case is attached to check please.

Kind regards

Maimouna
Attached Files
File Type: gz myCylinderCase-Fsi3d.tar.gz (11.3 KB, 7 views)

Last edited by wyldckat; November 22, 2015 at 15:08. Reason: repaired broken dictionary content
Maimouna is offline   Reply With Quote

Old   November 22, 2015, 15:31
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Maimouna,

Quote:
Originally Posted by Maimouna View Post
Then I ran:
Code:
blockMesh
extrudeMesh
But it didn't give the exact result I was hoping for.

also, I didn't find what I hope. ExtrudeMesh utility give me this error
Code:
[...]

--> FOAM FATAL ERROR: 
Cannot find patch frontPlane in the source mesh.
Valid patch names are 
3
(
sides
originalPatch
otherSide
)
[...]
That tells frontPlane is a wrong patch name. Any idea to prevent that?
I've tested this just now with the case you attached and it worked for me!
Code:
Build    : 3.1-1dd681f6e943
Exec     : extrudeMesh
Date     : Nov 22 2015
Time     : 20:14:19
Host     : machine
PID      : 4578
CtrlDict : /home/ofuser/foam/foam-extend-3.1/etc/controlDict
Case     : /home/ofuser/foam/ofuser-3.1/run/myCylinderCase-Fsi3d/fluid
nProcs   : 1
SigFpe   : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Selecting extrudeModel linearNormal
Extruding patch frontPlane on mesh "/home/ofuser/foam/ofuser-3.1/run/myCylinderCase-Fsi3d/fluid"

Create polyMesh for time = 0

Writing patch as surfaceMesh to "/home/ofuser/foam/ofuser-3.1/run/myCylinderCase-Fsi3d/fluid/frontPlane.sMesh"

Extruding patch with :
    points     : 9114
    faces      : 8850
    normals[0] : (0 0 -1)

Mesh bounding box : (0 0 -0.9) (19.5 12 0.1)
        with span : (19.5 12 1)
Merge distance    : 0.0001

Collapsing edges < 0.0001 ...

End
Therefore something wrong must have happened when you ran blockMesh.

Quote:
The second suggestion

Code:
But then I though a bit better and I have to ask: Why are you trying to  complicate this, when you can simply modify the two "blockMeshDict"  files and change the Z position values and increase the mesh refinement  along that direction?
I tried that, it is running but the beam is not moving. My case is attached to check please.
Sorry, but the case is very slow to run on my machine and I didn't manage to run it during the weekend.

The only reasons I see for it to no longer be able to move is possibly due to at least one of the following:
  1. In "solid/constant/rheologyProperties" you have this line:
    Code:
    planeStress yes; //No for 3D, Yes for 2D
    I don't know what this is for, but the comment on the right is either switched around or the parameter should be set to "no" for the 3D case?
  2. The fluid and solid properties are a lot different from the last simulation I have. Have you done at least the analytical calculations of what is the force needed for bending this kind of metal and geometry?
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 19, 2016, 10:16
Default
  #7
New Member
 
Wojciech Gołąbek
Join Date: Dec 2013
Posts: 29
Rep Power: 12
Woj3x is on a distinguished road
Hi,
I use ICEM CFD for meshing so I can't help you in this but IMO this case isn't so hard, so you can easly handle this with blockMesh but it's gonna be time consuming (it's all depend on your experience with blockMesh).

Good option could be to analyze blockMeshDict file from case beamInCrossFlow (it's 3D case from fsiFOAM tutorials). It should be good place to start.

Best regards,
Wojciech
Woj3x is offline   Reply With Quote

Old   November 24, 2016, 04:27
Default
  #8
New Member
 
Karthick
Join Date: Oct 2016
Location: Munich
Posts: 18
Rep Power: 9
KarthickRajkumar is on a distinguished road
Quote:
Originally Posted by Maimouna View Post
Dear Bruno,

many thanks for that well explanation in the last post.

As a good news after some changes in the last case ''myCylinderCase-Fsi'' the beam is moving as shown in the attached screenshot. (I tried to attach animation but I don't know which extension is accepted .avi not accepted). The new case with new changes is attached too to have a look.
Dear Maimouna,

I am doing the similar simulation using fsifoam solver. Similar setup as HronTurekfsi tutorial, but with a different geometry. I followed the steps suggested by Bruno until here. I have the same problem as yours. The simulation works fine but there is no change in the movement of the plate like you had.

You had said you did some changes in the set up and beam was moving. Could you please write me about what caused that problem and how exactly did yu fix it??

I see you didn't change the inletVelocity as Parabolic or gradual increase at the inlet as Bruno suggested. I would like to know how did you fix that error so that I may give a thought about it in my case.

Thanks,
Karthick
KarthickRajkumar is offline   Reply With Quote

Old   November 24, 2016, 04:52
Default
  #9
Senior Member
 
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 13
Maimouna is on a distinguished road
Quote:
Originally Posted by KarthickRajkumar View Post
Dear Maimouna,

I am doing the similar simulation using fsifoam solver. Similar setup as HronTurekfsi tutorial, but with a different geometry. I followed the steps suggested by Bruno until here. I have the same problem as yours. The simulation works fine but there is no change in the movement of the plate like you had.

You had said you did some changes in the set up and beam was moving. Could you please write me about what caused that problem and how exactly did yu fix it??

I see you didn't change the inletVelocity as Parabolic or gradual increase at the inlet as Bruno suggested. I would like to know how did you fix that error so that I may give a thought about it in my case.

Thanks,
Karthick
Hi Karthick,

sure I will help, could you please provide me by your case to have a look.

Which extend version yoy use?
What is your geometry and BCs?

Kind regards
Maimouna
Maimouna is offline   Reply With Quote

Old   November 24, 2016, 05:39
Default
  #10
New Member
 
Wojciech Gołąbek
Join Date: Dec 2013
Posts: 29
Rep Power: 12
Woj3x is on a distinguished road
Hi Karthick,
Sorry I did not answer but I had a lots to do in last week.
Could you look into your log.fsifoam file and tell us how big is Courant number in your results?
Woj3x is offline   Reply With Quote

Old   November 24, 2016, 07:17
Default
  #11
New Member
 
Karthick
Join Date: Oct 2016
Location: Munich
Posts: 18
Rep Power: 9
KarthickRajkumar is on a distinguished road
Hai Maimouna and Wojciech,

Thank you for the prompt reply.

I use foam-extend 3.2 for my simulation.
My geometry is of a musical instrument. You can see the geometry I have roughly drawn under comments in the fluid/constant/polymesh/blockMeshdict for better understanding.

I have also specified in the diagram what is cylinder and plate in my case.
My aim is to see the deflection of the plate due to the flow.

Initially I tried with BeamInCross flow and then I realised it has got some other situation for the inlet velcoity.
So now I am using HronTurek case, which has similar setup as mine and I think is the better option for my simulation.

So about the BC as you asked:

U: Only change I made is the inlet velocity set to (-10 0 0) - negative since the flow is in the negative x direction.
P: No changes
pointMotionU: No changes

Additional Info

I ran the HronTurek case with the inlet as outlet and outlet as inlet, so that the flow comes from negative x direction and to ensure that the simulation runs in such a case. It does run and I see the deflection.

Things which I doubt:

1. I ran the simulation only for 2 seconds since it takes more than 10 hours due to fine mesh. So should I run the simulation for more seconds to check for the deflection?

2. The difference between the tutorial and my set up is that, cylinder is not attached to any wall in tutorial but in my case the cylinder is attached to a wall. I believe it should not affect the simulation set up. And may be because it is fixed the deflection can be zero until 2 seconds. What do you think in this case?

3. Deflection is 0 for every time step until 2 seconds and just in case you need the force in force.dat file, here it is:

Force at the end of 2 seconds is
17.0856 527.416 1

@ Wojciech: About the courant number: I didn't save the log file. Didn't know I have to. But my simulation blows up at 2 seconds due to high courant number. (I ran it with 0.00001 time step). I thought of running the simulation in the cluster wth 0.0000001 time step if it shows some deflection.
These are all my thoughts up till now. Could you please help me at it. Any comments or suggestion would really help me.

You can find the my latest case file here. Please avoid any other files I uploaded before.

Thanks,
Karthick
Attached Files
File Type: gz HronTurekFsi3 (check-5).tar.gz (12.5 KB, 13 views)
KarthickRajkumar is offline   Reply With Quote

Old   November 24, 2016, 08:38
Default
  #12
New Member
 
Wojciech Gołąbek
Join Date: Dec 2013
Posts: 29
Rep Power: 12
Woj3x is on a distinguished road
I used fe-3.1 in my case and I have some problems to run your case on it...

Your mesh (fluid) is very rough, especially in the space between the "pumpkin" and "bamboo tubes" where you can assume to get really high velocity. You need to make more than 3 elements in X direction (and I would also add few in Y direction). IMO you need at least 5 elements in X direction (but it's still not enough to get good results) to test this case.

You need also to create better mesh transition between blocks (I've already wrote sth about it in this topic).

Also I don't think that starting your tests with 10 m/s is good idea. If I were you I would use 0.5 m/s (or even less then it) to see how it'll work (courant number, displacements, forces, ect.). It will be easier to improve your mesh and then you will try to find good time step for you main problem.

Kind regards
Wojciech
KarthickRajkumar likes this.
Woj3x is offline   Reply With Quote

Old   November 24, 2016, 08:43
Default
  #13
Senior Member
 
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 13
Maimouna is on a distinguished road
Quote:
Originally Posted by KarthickRajkumar View Post
Hai Maimouna and Wojciech,

Thank you for the prompt reply.

I use foam-extend 3.2 for my simulation.
My geometry is of a musical instrument. You can see the geometry I have roughly drawn under comments in the fluid/constant/polymesh/blockMeshdict for better understanding.

I have also specified in the diagram what is cylinder and plate in my case.
My aim is to see the deflection of the plate due to the flow.

Initially I tried with BeamInCross flow and then I realised it has got some other situation for the inlet velcoity.
So now I am using HronTurek case, which has similar setup as mine and I think is the better option for my simulation.

So about the BC as you asked:

U: Only change I made is the inlet velocity set to (-10 0 0) - negative since the flow is in the negative x direction.
P: No changes
pointMotionU: No changes

Additional Info

I ran the HronTurek case with the inlet as outlet and outlet as inlet, so that the flow comes from negative x direction and to ensure that the simulation runs in such a case. It does run and I see the deflection.

Things which I doubt:

1. I ran the simulation only for 2 seconds since it takes more than 10 hours due to fine mesh. So should I run the simulation for more seconds to check for the deflection?

2. The difference between the tutorial and my set up is that, cylinder is not attached to any wall in tutorial but in my case the cylinder is attached to a wall. I believe it should not affect the simulation set up. And may be because it is fixed the deflection can be zero until 2 seconds. What do you think in this case?

3. Deflection is 0 for every time step until 2 seconds and just in case you need the force in force.dat file, here it is:

Force at the end of 2 seconds is
17.0856 527.416 1

@ Wojciech: About the courant number: I didn't save the log file. Didn't know I have to. But my simulation blows up at 2 seconds due to high courant number. (I ran it with 0.00001 time step). I thought of running the simulation in the cluster wth 0.0000001 time step if it shows some deflection.
These are all my thoughts up till now. Could you please help me at it. Any comments or suggestion would really help me.

You can find the my latest case file here. Please avoid any other files I uploaded before.

Thanks,
Karthick
Hi Karthick,

don't worry, I will have a look. My case implemented in fe31, but never mind I will try to get some time to study your case. For any further information or to remind me contact via may78may@hotmail.com. Because sometimes I'm taking long and don't check the forum.

All the best
Maimouna
KarthickRajkumar likes this.
Maimouna is offline   Reply With Quote

Old   November 27, 2016, 11:14
Default
  #14
New Member
 
Karthick
Join Date: Oct 2016
Location: Munich
Posts: 18
Rep Power: 9
KarthickRajkumar is on a distinguished road
Hai,

That's right Wojciech!! Thanks for the suggestion. It really helped me a lot. I added 5 elements along X direction and 3 elements along Y direction and Inlet Velocity set to (-0.25 0 0).

The simulation runs with no deflection of plate until 2 seconds. After 2 seconds I see the deflection of the point as follows.

2.00001 2.85381e-09 -2.58931e-09 4.7758e-23
2.00002 2.53603e-09 -6.97833e-09 -9.52907e-24
2.00003 -1.7756e-07 -3.69658e-07 -8.22465e-23

Until 2.00003 s, the courant number max is below 0.2, but at 2.0004 s the Max Courant number shoots up to 22.3112 (with velocity magnitude 149 m/s) in iteration 15 and to 2499.58 (with velocity magnitude 450 m/s) in iteration 16 and the simulation had stopped.
1. Could you find possible reasons for this?

I think as the plate starts deflecting, the velocity near the gap goes up (2 way coupling) and this can cause the Co number go high. In that case, how should I avoid this? And what time step would you advise me? With 0.00001 time step it took 15 hours on my laptop.

2. My aim is to do compressible fsi for my setup along with LES modelling. So I have planned to work on HronTurek tutorial case first towards compressible fsi (which I have no idea how to implement it) and then applying it on my case.

How would you advise me to carry this out in general? Since fsiFoam is based on pisoFoam solver (incompressible), does it involve tedious coding stuff for me to do compressible fsi for my setup?

Thanks for spending time to study my case @Maimouna. And also for the mailID

Thank you for helping me out!!
Karthick
KarthickRajkumar is offline   Reply With Quote

Old   November 27, 2016, 12:09
Default
  #15
New Member
 
Wojciech Gołąbek
Join Date: Dec 2013
Posts: 29
Rep Power: 12
Woj3x is on a distinguished road
1. I had similar problem in my case (It took me really a lot of time to find solution). Adding turbulence model solved it so try it.
2. IMO the easiest way to do this will be manually adapt solver which already exist in OpenFOAM. Here you cane find some information how to do it:
http://www.tfd.chalmers.se/~hani/kur...es_vyzikas.pdf
http://www.tfd.chalmers.se/~hani/kur...FlowReport.pdf
Even if you do not know C ++ very well you still should relatively easy handel it.

I do not know if you ever used LES but this simulation can take much more time than you think
In my case (it was 3D case with really complicated geometry, k-omega model and time step: 1e-7 [s]) it took me almost two months to get results for 1.5e-4 [s] (in my case fluid domain: 579 968 elements and solid domain: 32 256 elements). LES with good mesh even in 2D can take lots of time.

Time step dependent on mesh sieze and Courant number so the best way to find it is a trial and error method. You have a constant velocity (at least I suppose) on your inlet, so it won't be take too much time to find it.

Last edited by Woj3x; November 29, 2016 at 09:46.
Woj3x is offline   Reply With Quote

Old   November 30, 2016, 03:55
Default
  #16
New Member
 
Karthick
Join Date: Oct 2016
Location: Munich
Posts: 18
Rep Power: 9
KarthickRajkumar is on a distinguished road
Quote:
Originally Posted by Woj3x View Post
1. I had similar problem in my case (It took me really a lot of time to find solution). Adding turbulence model solved it so try it.
2. IMO the easiest way to do this will be manually adapt solver which already exist in OpenFOAM. Here you cane find some information how to do it:
http://www.tfd.chalmers.se/~hani/kur...es_vyzikas.pdf
http://www.tfd.chalmers.se/~hani/kur...FlowReport.pdf
Even if you do not know C ++ very well you still should relatively easy handel it.
Hai Wojciech,

Thanks for sharing the documents. That Indeed helped me to understand how the headerfiles are linked in fsi and how fsi library is connected to central installation of foam extend.

In the document, he has implemented interflow model built from interDymFoam. So I will just quickly write down the procedure required in my case of building rhoPimpleFlow model from rhoPimpleFoam.

1. Initially the src/fluidStructureInteraction/flowModels/pisoFlow files are copied and created rhoPimpleFlow as described and compiled after adding the flow model path to Make/files file.

2. On comparing with rhoPimpleFoam solver, I have to add the missing header files to the rhoPimpleFlow. So I included turbulenceModel.H, bound.H to rhoPimpleFlow.C and basicPsiThermo.H to rhoPimpleFlow.H and compiled it again. I did this.

3. Now I have to write down the fields (from CreateFields.H in solver directory) into rhoPimpleFlow.C and declare it in the rhoPimpleFlow.H.

So I planned to add field one by one and compile it.

Here is the first field in CreateFields.H
Code:
    autoPtr<basicPsiThermo> pThermo
    (
        basicPsiThermo::New(mesh)
    );
    basicPsiThermo& thermo = pThermo();

    volScalarField& p = thermo.p();
    volScalarField& h = thermo.h();
    const volScalarField& psi = thermo.psi();
so I added the following code to rhoPimpleFlow.C
Code:
    pThermo_ // added
    (
        basicPsiThermo::New(mesh)
    ),
    basicPsiThermo& thermo_ = pThermo(),

    volScalarField& p = thermo.p(),
    volScalarField& h = thermo.h(),
    const volScalarField& psi = thermo.psi(),
and declared autoPtr<basicPsiThermo> pThermo_; in the rhoPimpleFlow.H file and compiled it.

It showed some errors as ‘Foam::basicPsiThermo’ is not a direct base of ‘Foam::flowModels::rhoPimpleFlow’ and also other errors. I have attached below both .H and .C file along with log file. This field is not similar to U or p field, so I got stuck with this. I am going to need more help before Implementing rhoPimpleFoam I suppose!!

Could you please tell where lies the problem or is there any problem with my way of approach. As in, do I have to understand everything in the solver code and then code it one by one. Also if I can learn better about all these, please share it.

Thanks,
Karthick
Attached Files
File Type: gz rhoPimpleFlow with log.tar.gz (6.0 KB, 8 views)
KarthickRajkumar is offline   Reply With Quote

Old   November 30, 2016, 10:06
Default
  #17
New Member
 
Wojciech Gołąbek
Join Date: Dec 2013
Posts: 29
Rep Power: 12
Woj3x is on a distinguished road
Unfortunately, I've never done it myself so I suppose that I won't be able to help you in this one (because my advice in this case will be more like guessing).
Maybe Bruno Santos (wyldckat) or Maimouna will be able to help you in this part.
Kind regards,
Wojciech
Woj3x is offline   Reply With Quote

Old   December 1, 2016, 13:04
Default
  #18
New Member
 
Karthick
Join Date: Oct 2016
Location: Munich
Posts: 18
Rep Power: 9
KarthickRajkumar is on a distinguished road
Hai,

Thanks for the suggestion. I think I should learn PISO algorithm ---> how the those equations are coded in icoFoam solver-----> how the turbulence equations are added to icoFoam to form PisoFoam solver ---> finally adding compressibility factor to form rhoPisoFoam solver

And gain knowledge of codes behind icoFlow and pisoFlow models in FSI library (which are directly based on icoFoam and pisoFoam solvers). With this knowledge, I hopefully can implement rhoPisoFlow or rhoPimpleFlow as a flow model.

Thanks for the help!!
Karthick
KarthickRajkumar is offline   Reply With Quote

Old   December 1, 2016, 13:23
Default
  #19
New Member
 
Wojciech Gołąbek
Join Date: Dec 2013
Posts: 29
Rep Power: 12
Woj3x is on a distinguished road
It's probably the best approach you can make now.
I could only tell you that codes behind icoFoam and pisoFoam are pretty simple so you should do it this rather fast. The only difference between pisoFlow and pisoFoam is that the time loop is out from pisoFlow (in fsiFOAM algoritm).

You also need to find how the algorithm for transferring data between solid and fluid solvers work (this is probably the most important thing to adapt rhoPimpleFoam).

Kind regards,
Wojciech
Woj3x is offline   Reply With Quote

Old   December 15, 2016, 10:29
Default
  #20
New Member
 
Karthick
Join Date: Oct 2016
Location: Munich
Posts: 18
Rep Power: 9
KarthickRajkumar is on a distinguished road
Hai,

Finally I was able to implement rhopisoFlow into FSI library. It indeed required quite some effort to make it work, but learnt a lot trying to implement this.

I checked the model with HronTurek fsi tutorial and I could simulate it under compressible flow conditions.

Thanks @Wojciech @Maimouna for all the help.

Now it's time to run it on my application.

Regards,
Karthick
KarthickRajkumar is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 04:08.