CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM CC Toolkits for Fluid-Structure Interaction (https://www.cfd-online.com/Forums/openfoam-cc-toolkits-fluid-structure-interaction/)
-   -   [FSI] Dynamic Mesh Problem for FSI simulation (https://www.cfd-online.com/Forums/openfoam-cc-toolkits-fluid-structure-interaction/214083-dynamic-mesh-problem-fsi-simulation.html)

Hgholami January 18, 2019 12:14

Dynamic Mesh Problem for FSI simulation
 
Dear Foamers
I try to simulate FSI problem with icoFsiElasticNonLinULSolidFoam solver.
As the solver isn't work with displacement base mesh motion, I use velocity base motion as:
//-------
dynamicFvMesh dynamicMotionSolverFvMesh;
twoDMotion yes;
solver refVelocityLaplacian;
diffusivity quadratic inverseDistance 1(plate);
//---
my model is near a cylinder and by deformation of plate, the mesh deforms to give negative cell. I want to know, which dynamicMesh can help me to model this problem?
https://cdn.pbrd.co/images/HX2KaA0.png
https://pasteboard.co/HX2KaA0.png
Are there any remeshing code to remesh during run?
Thanks

Hgholami January 19, 2019 03:04

I replace displacement based dynamicMesh such as SBR etc. instead of velocity base but All have the error as:
--> FOAM FATAL ERROR:
Problem with mesh motion solver selection

From function icoFsiElasticNonLinULSolidFoam
in file moveFluidMesh.H at line 140.

FOAM aborting
Similar error appear with RBF. Do you have any Ideas? Thanks

bigphil January 21, 2019 06:51

Hi,

Did you try the "velocityLaplacian" and/or "laplace" mesh motion solvers?

Philip

Hgholami January 21, 2019 09:39

Quote:

Originally Posted by bigphil (Post 722478)
Hi,

Did you try the "velocityLaplacian" and/or "laplace" mesh motion solvers?

Philip

Dear Philip
Thanks for your reply. I used velocityLaplacian as:
//--------
solver velocityLaplacian;
frozenDiffusion yes;
diffusivity quadratic inverseDistance (plate);
distancePatches (plate fix); //or (plate)
//------- negative cell in tip of deformable plate
https://cdn.pbrd.co/images/HXtVeWW.png
laplace with diffusivity linear as:
//---------
solver laplace;
frozenDiffusion yes;
diffusivity linear 2.5 (plate fix); //or 1.5,1
distancePatches (plate fix);
//------negative cell in fix support of plate: some time step earlier
https://cdn.pbrd.co/images/HXtXouJ.png
laplace with diffusivity linear as:
//---------
solver laplace;
frozenDiffusion yes;
diffusivity quadratic 1 (plate);
distancePatches (plate);
//------negative cell in fix support of plate: some time step earlier
https://cdn.pbrd.co/images/HXtYKGq.png
patchEnhanced inverseDistance 2 (plate)
https://cdn.pbrd.co/images/HXtZUz7.png

I run this model with student license of ANSYS and in fluid solver (FLUENT) used remeshing technique that run was OK.

Hgholami January 21, 2019 09:50

The diffusivity extend the cells near the plate, but in this model the space is limited. In the FLUENT also I forced to active remeshing to avoid negative cell. Is it possible to active extra technique to remeshing or any Idea? thanks

bigphil January 21, 2019 10:40

You could also try with:
Code:

frozenDiffusion no;
Currently, full remeshing has not been implemented, but you are welcome to add it! :P

Philip

wyldckat January 22, 2019 19:38

Quick answer: Quoting a bit from a PM that Hgholami sent me:
Quote:

Originally Posted by Hgholami
Can you favor to choice good dynamicMesh algorithm for my model? thanks a lot.

From what I can see on the mesh images, there is no magic dynamic mesh algorithm that will solve your problem here. There isn't enough mesh resolution to allow for the cells to gradually distort and absorb the mesh distortion. Even if RBF or similar was used, it would eventually break elsewhere on the far boundaries away from the plate.

Something has got to give, so either you increase the mesh resolution or reduce the allowed solid deflection...

And if given enough mesh resolution, I believe that "diffusivity quadratic inverseDistance [...]" should work just fine...

Daniel_Khazaei January 22, 2019 23:53

1 Attachment(s)
Dear Hojatollah,

you may try the fsiFoam solver from here:

https://openfoamwiki.net/index.php/E...re_interaction

it provides IQN-ILS coupling algorithm and from my experience it is even generally more stable in regards of fluid and solid solvers.

From the time I was working with ANSYS Fluent at the university, I recall that to avoid negative cell volume in presence of boundary layer mesh, you should make the boundary layer region move with the moving boundary patch! These cells should not get deformed by the dynamic mesh solver, as this will usually reduce their quality until reaching the point that the solution diverges. They should only follow the boundary patch displacement vector while preserving their shape. If I'm not mistaken, there is an option in Fluent called "Deform Adjacent Boundary Layer with Zone".

I have used this to model a complex 3D trimaran hull under heave and pitch motion successfully. Without this option enabled, I was getting negative cell volume after a few time steps. Re-meshing is another option, but It was not for me at that time when dealing with 4m cells using limited computational resources! The image of the mesh I used (xz plane cut) is attached...

However, I'm not aware of such an option in foam-extend dynamic mesh solvers...

Hgholami January 23, 2019 21:48

Thanks dear Santos
I increase mesh resolution and change coupling algorithm to IQN-ILS with diffusivity quadratic inverseDistance and velocityLaplacian. First I import mesh from ANSYS and use flattenMesh, then run started. The simulation is now run more time step but still the problem in checkMesh exist.
//............................................
Mesh non-orthogonality Max: 90.3106 average: 18.4533 Threshold = 70
*Number of severely non-orthogonal faces: 27.
***Number of non-orthogonality errors: 1.
Writing 28 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 1 faces are incorrectly oriented.
Writing 1 faces with incorrect orientation to set wrongOrientedFaces
***Max skewness = 78.0099, 1 highly skew faces detected Threshold = 4
Writing 1 skew faces to set skewFaces

Failed 3 mesh checks.

wyldckat January 24, 2019 20:11

Quick request: One or two images that show where the worst distortions occur, would make it easier to diagnose how perhaps this can further be solved...

alia January 25, 2019 07:39

Quote:

Originally Posted by Hgholami (Post 722766)
Thanks dear Santos
I increase mesh resolution and change coupling algorithm to IQN-ILS with diffusivity quadratic inverseDistance and velocityLaplacian. First I import mesh from ANSYS and use flattenMesh, then run started. The simulation is now run more time step but still the problem in checkMesh exist.
//............................................
Mesh non-orthogonality Max: 90.3106 average: 18.4533 Threshold = 70
*Number of severely non-orthogonal faces: 27.
***Number of non-orthogonality errors: 1.
Writing 28 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 1 faces are incorrectly oriented.
Writing 1 faces with incorrect orientation to set wrongOrientedFaces
***Max skewness = 78.0099, 1 highly skew faces detected Threshold = 4
Writing 1 skew faces to set skewFaces

Failed 3 mesh checks.

Hi Hgholami!
I think your problem is the same as what is discussed in this thread:
https://www.cfd-online.com/Forums/op...oam-141-a.html
Hrvoje Jasak has suggested using a vertex-based solver. You can see the details there.
Cheers,
Ali

Hgholami January 28, 2019 11:16

Dear Santos
I check the mesh for a face with wrongOrientedFaces and it seen, it is in figure below.
https://cdn.pbrd.co/images/HYyDGsZ.png
with dynamicMeshDic as:
solver refVelocityLaplacian;
frozenDiffusion no;
diffusivity quadratic inverseDistance 2 (plate fix);
distancePatches (plate);
the other figure is :
https://cdn.pbrd.co/images/HYyGdjy.png

Stephen Waite January 28, 2019 16:12

Hi Hgholami,

Sorry for the slow reply to your PM, I was on leave.

so some things that have helped me with mesh motion, as mentioned by Alia, there are non-FVM based motion solvers that from memory, are more computationally expensive (although I didnt find them that bad) but can maintain better mesh quality.

try changing
diffusivity quadratic inverseDistance 2 (plate fix);
to
diffusivity inverseFaceDistance (plate);

With the quadratic wall function, I have found that while it gives nice diffusion results when there is a single moving part such as a wall moving in a constant direction, it is not always better when the geometry is more complex, I used to get cell shearing in my models when I used this diffusion method.

I can see you have two walls there, the plate and I guess a cylinder (which I think is named fix?) Are they both moving? or just the plate?

If you haven't tried it already, you could also re-mesh the domain to get a different cell distribution and see if this fixes the issue, this has worked for me in the past.

Can you also please run
Code:

checkMesh -allGeometry
for the initial mesh time 0 and post the results.Good meshes are important in CFD, but they are even more important when you are doing mesh motion especially in openFOAM.

Can you also give an indication for how much that plate is going to move, As wyldckat has said, you need to have enough degrees of freedom to allow for the deformation to be diffused through the domain, but there is not a lot of space between the two walls (although you seem to have increased it in your latest pictures compared to the first). If the end of the plate which is sort of tangential to the cylinder is going to rotate by say 45 degrees you may need to move to either a CFD package with remeshing or to a meshless method like immersed boundaries.

If you want to stick with openFOAM, and you are not to keen to implement remeshing, there was a case of something simulating a gear pump with remesh-restarts whenever mesh quality deterorated (pretty much manual remeshing)

https://www.cfd-online.com/Forums/op...gear-pump.html

you can download the report in the first post.

Cheers
Stephen

Hgholami January 28, 2019 22:24

Thanks dear waite
I checkMesh with -allgeometry in initial time and a below result obtained:
HTML Code:

Checking geometry...
    This is a 2-D mesh
    Overall domain bounding box (-0.3 -0.025 0) (0.5 0.025 0.0002)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
    Mesh (non-empty, non-wedge) dimensions 2
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (-3.20367e-20 1.6451e-18 5.9056e-19) Threshold = 1e-06 OK.
    Max cell openness = 2.12053e-16 OK.
    Max aspect ratio = 26.3712 OK.
    Minumum face area = 5.32311e-10. Maximum face area = 2.85632e-05.  Face area magnitudes OK.
    Min volume = 1.06462e-13. Max volume = 5.71263e-09.  Total volume = 7.88797e-06.  Cell volumes OK.
    Mesh non-orthogonality Max: 66.8216 average: 12.9801 Threshold = 70
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.49926 OK.
    Min/max edge length = 7.071e-06 0.00644383 OK.
    All angles in faces OK.
    Face flatness (1 = flat, 0 = butterfly) : average = 1  min = 1
    All face flatness OK.
    Cell determinant (wellposedness) : minimum: 0 average: 4.26285e-40
 ***Cells with small determinant found, number of cells: 42803
  Writing 42803 under-determined cells to set underdeterminedCells

Failed 1 mesh checks.

End

"plate" is a moving part and "fix" is end of beam that fixed in domain. the circular cylinder is also fixed in domain. The plate usually rotate about 85 degree but in mentioned time it only rotated max 10 degree.

Stephen Waite February 4, 2019 20:46

1 Attachment(s)
Hi there,

So I think you are really going to struggle to get 85 degrees of rotation with such a small gap, you can draw on a piece of paper how those cells would deform and its not pretty.

I think you either need to preform some form of remeshing step/re-mapping like the attachment I included in my last post, although that might get a bit tedious. Other software may be able to perform the type of remeshing you need, you mentioned you had this model working in fluent? why did you change to OF?

Your mesh Non-orthogonality is very high for the basic mesh, max 66 is not great. You should maybe have a go at structuring your mesh a bit better, you have a plate and a cylinder so I feel like you should be able to get that to 40 pretty easily. What did you use to create your mesh? it looks a bit like a automatic Netgen quad mesh, you could try cfMesh if you want 2D and that might give you stricter quality control. Did you try moving to the face based motion diffusion methods?

If you dont want to go the remeshing route, you could probably start looking into mesh free methods like immersed boundaries or smooth particle hydrodynamics, although I'm not sure if there is an opensource fsi codes for these floating around.

The only other thing I can think of is to combine some kind of AMI region into your domain, but that would probably involve some coding on your end to have the AMI zone rotate as a function of the curvature of the beam, so the AMI mesh would need to deform radially so the fixed end remains static in the centre.

Hgholami February 6, 2019 14:11

Dear Waite
with respect and thanks for your reply. My model is as your attachment fiqure but with two plates in opposite sides (top and bottom of cylinder).
First, I want to use opensource software for FSI simulation. So, I increase dense of mesh and the solution with under relaxation for P and u increases more time step but with rotating plates, the mesh deforms and error occurs. I also used inverseFaceDistance, and result is same.
for AMI mesh, the problem is that the deforming plate is more than one, for example 2. As I merge 2 plates to one boundary condition for using icoFSI... solver, so I think I can't use AMI mesh with one axis, center of axis and etc. So, I think the solution need a layering method/remeshing to destroy small layers/cells. If you have good suggestion, I will wait for favor.
I will also try using cfmesh for improving quality. Thanks for your suggestion.

wyldckat February 6, 2019 19:10

Greetings to all!

@Hgholami:
Quote:

Originally Posted by Hgholami (Post 723219)
"plate" is a moving part and "fix" is end of beam that fixed in domain. the circular cylinder is also fixed in domain. The plate usually rotate about 85 degree but in mentioned time it only rotated max 10 degree.

Wait.... hold on... can you provide a complete schematic of the geometries you are trying to simulate and how they are meant to move?

Or is the schematic provided by Stephen Waite completely accurate for what you are trying to do? Because if it is, I'm having a hard time understanding what is the physical experimental that this simulation is trying to recreate...

What I mean is that it feels like you're trying to use a hammer, when a pencil must be used... simply because the problem is not properly understood.

Because from what I was able to deduce, the only way out of this situation might require using overset mesh (also known as chimera grid) modelling, where the plate is on the overset mesh region. I believe that the version of foam-extend 4.1 that is still in development, might have this capability, but I don't know if it includes FSI capabilities or not.
Then there is the solids4foam toolkit, which hasn't been made public yet, but you can ask for access to it, so that you could then use it with OpenFOAM+ (namely OpenFOAM.com) with it and therefore have overset capabilities... but still, I don't remember seeing a solver with overset mesh capabilities in solids4foam, it's just that it compiles and works with OpenFOAM-v1812 or v1806... I'm not certain there... so it would be feasible to adapt one of the solvers to use overset mesh instead of the current implementation.

So, without a complete and clear image and flow profile of what is meant to be simulated, it's getting very hard to suggest anything more specific than this.

Best regards,
Bruno

edit: Stephen's suggestion with AMI might work and you can use more than one AMI region. Actually, it's called GGI in foam-extend...

Hgholami February 16, 2019 21:52

I dense mesh and reduce flexibility of structure. Now, the problem is solved.
Thanks for your favor

Daniel_Khazaei February 17, 2019 08:12

Quote:

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

Then there is the solids4foam toolkit, which hasn't been made public yet, but you can ask for access to it


Dear Bruno,

Would you please tell me where I should put my request to get access to this toolkit?:rolleyes::)

Edit: never mind, found the document describing how to request for access.
Code:

https://foam-extend.fsb.hr/wp-content/uploads/2018/12/02_Tukovic_Fluid_Structure_Interation_solid4Foam.pdf

popa March 19, 2019 21:00

monitor the stress on the solid
 
Quote:

Originally Posted by Hgholami (Post 722325)
Dear Foamers
I try to simulate FSI problem with icoFsiElasticNonLinULSolidFoam solver.
As the solver isn't work with displacement base mesh motion, I use velocity base motion as:
//-------
dynamicFvMesh dynamicMotionSolverFvMesh;
twoDMotion yes;
solver refVelocityLaplacian;
diffusivity quadratic inverseDistance 1(plate);
//---
my model is near a cylinder and by deformation of plate, the mesh deforms to give negative cell. I want to know, which dynamicMesh can help me to model this problem?
https://cdn.pbrd.co/images/HX2KaA0.png
https://pasteboard.co/HX2KaA0.png
Are there any remeshing code to remesh during run?
Thanks






Which version of openFoam do you use?I now use foam-extend4.0,and run the same case,but i don't know how to monitor the stress on the solid.Can you provide some advice?Thank you.


All times are GMT -4. The time now is 21:47.