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/)
-   -   [solids4Foam] FSI simulation of a Wind Turbine (https://www.cfd-online.com/Forums/openfoam-cc-toolkits-fluid-structure-interaction/231975-fsi-simulation-wind-turbine.html)

Dimash November 25, 2020 04:06

FSI simulation of a Wind Turbine
 
1 Attachment(s)
Dear all,

I am trying to perform an FSI simulation of a Wind Turbine, and, during my search for appropriate tool, I found solids4foam by Dr. Cardiff. I've build my case based on tutorials, which were included with the solids4foam, and I faced some difficulties. Here are some information about my setup:

1) The solids4foam was built on foam-extend 4.1
2) I am using full rotor model of the NREL 5MW wind turbine

Further, I will explain the difficulties, which I faced:

1) Aligning fluid and solid models.
In all solids4foam tutorials, the models were created using blockMesh and they are perfectly align with each other. However, I am studying blades, which have complex structure and they are much harder to align perfectly. I've used ANSYS fluent and snappyHexMesh to create a mesh, but using both methods gave me the following error:
Code:

--> FOAM FATAL ERROR:
ZoneA and zoneB interfaces are not conformal (zoneA patch = interface, zoneB patch = interface)
directMap method requires conformal interfaces!

    From function directMap::checkZoneSizes() const
    in file fluidSolidInterfaces/fluidSolidInterface/interfaceToInterfaceMapping/directMapInterfaceToInterfaceMapping/directMapInterfaceToInterfaceMapping.C at line 65

I changed the interpolation method from direct to RBF and GGI, but ended up with these errors:

RBF interpolation:
Code:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted

GGI interpolation:
Code:

--> FOAM FATAL ERROR:
Master point addressing is not correct

    From function GGIInterpolation::masterToSlavePointInterpolate(const Field<Type> pf)
    in file /home/dimash/foam/foam-extend-4.1/src/foam/lnInclude/GGIInterpolation.C at line 492.

FOAM aborting

Aborted

What methods to create a mesh should I use or what should I do to overcome this problem?

I attached the figure with fluid model, solid model, and an overlap of the two models:
Attachment 81230

2) Rotating and deforming at the same time.
As I understand, solids4foam uses dynamicMotionSolverFvMesh to deform the mesh, but to simulate rotation effect I should use different dynamicFvMesh parameter. Is it possible to simulate a rotation effect with two way FSI without changing the source code, or I need to modify it?

Thank you in advance

Best regards,
Dinmukhamed

bigphil November 25, 2020 05:59

Hi Dinmukhamed,

This looks like an interesting problem. I have a few comments:
  • I am wary of the foam-extend-4.1 implementation; if posible, I suggest you also try foam-extend-4.0; in fact, you could also try the ".org' or ".com" versions to see if the AMI works for your interfaces
  • The RBF works well for smaller problems however when there are large numbers of faces on the interface it uses huge amounts of RAM (and it also gets very slow); I think the error you are showing is related to running out of RAM. I am sure there are smarter, more efficient RBF implementations out there that would help but I am guessing you do not want to go down that route;
  • In principal, the GGI should work for a case like this but it is clearly not; my guess is that it is failing to determine the mapping in just one or two problem locations. If possible, I suggest making a smaller, more simple version of your problem (e.g. just the tip of the blade) and check that works. Hopefully it will then be possible to understand what is causing the error.
  • Is it possible to attach the entire log from solids4foam?
  • As regards rotation, you have to remember that the solid uses a Lagrangian formulation; this means that the solid mesh motion is directly dependent on the displacement solution field and cannot be set independently (or at least it would be wrong to do so). So to achieve what you want, you would use a fixedRotation boundary condition on the solid (where the blade attaches to the axis). Then for the fluid, you would need a sliding interface at this axis to allow the fluid mesh to move as the solid rotates. I suggest starting with a simple 2-D problem to check it works.

Philip

Dimash November 26, 2020 08:02

1 Attachment(s)
Thank you for your reply,

I've tried to do what you suggested:

1) I've tried to build the solids4foam on foam-extend 4.0 and both com and org versions of OpenFoam, but I did not succeed in it. Is foam-extend 4.0 better than 4.1 or I can continue to work on the current version?

2) As you suggested, now I am testing the case on a tip of the blade. I am also turning coupling after some simulation time.

3) The GGI interpolation works for me, but now I have a floating point error. I will add the log file to this post. When I set the wind speed to 0, this error disappears. As I understand, this problem may be caused by inaccurate calculation of forces, acting on a solid model. Can you suggest how to fix it? I will try to enhance both fluid and solid meshes and see will it help or not.

The log file:
Attachment 81256

Best regards,
Dinmukhamed

bigphil December 1, 2020 11:55

Quote:

Originally Posted by Dimash (Post 788950)
1) I've tried to build the solids4foam on foam-extend 4.0 and both com and org versions of OpenFoam, but I did not succeed in it. Is foam-extend 4.0 better than 4.1 or I can continue to work on the current version?

Most testing is still performed on foam-extend-4.0 so I suggest using this version; alternatively you need to more carefully benchmark your results

Quote:

Originally Posted by Dimash (Post 788950)
2) As you suggested, now I am testing the case on a tip of the blade. I am also turning coupling after some simulation time. Alternatively/additionally, you can try using more under-relaxation in fvSolution e.g. set D/DD field under-relaxation to 0.5 or 0.3 or even 0.1.

OK, great.

Quote:

Originally Posted by Dimash (Post 788950)
3) The GGI interpolation works for me, but now I have a floating point error. I will add the log file to this post. When I set the wind speed to 0, this error disappears. As I understand, this problem may be caused by inaccurate calculation of forces, acting on a solid model. Can you suggest how to fix it? I will try to enhance both fluid and solid meshes and see will it help or not.

From the log, I can see a couple of things:
  • You are running in parallel: I suggest running in serial until everything works then go to parallel, as parallel can have its own issues;
  • The solid model does not converge and crashes: I suggest try much stiffer properties (e.g. multiple Young's modulus by 1e6) to see if it then works. If it does, then reduce the stiffness incrementally until you find where it breaks. This should give some insight into the problem.

Philip

Dimash December 18, 2020 02:53

After performing multiple simulations and testing different models, I successful run an FSI simulation of a wind turbine, but I am still struggling with rotational part.

The progress in FSI:
1) The main problem was poor quality of the solid mesh. I used snappyHexMesh to create better solid mesh and now everything works fine with both linear and non-linear deformation.

2) Using coarser fluid interface helps to solve the problem with misalignment, but I believe this is directly connected to the mesh quality
I am still struggling with implementing rotation to the FSI simulation. Can you suggest what I should do? At this moment I found following:
The deformation is controlled by dynamicFvMesh dynamicMotionSolverFvMesh from the dynamicMeshDict file. The rotation is controlled by dynamicFvMesh turboFvMesh from the same file. In order to have both deformation from FSI and rotation effect, I should combine both of the dynamic solvers.
Should I change the source code and to implement my own dynamic solver or I can somehow rotate the cellZone with FSI deformation with existing tools?

Thank you in advance

Update (20.12.2020): I've tried to a 2D simulation with fixedRotation boundary condition at solid part, however my solid model is not rotating. I will continue to search for possible solutions.

Sincerely,
Dinmukhamed

bigphil January 28, 2021 17:07

Hi Dinmukhamed,

Glad to hear that you have made progress. Thanks for your sharing your experience and giving tips.

As regards rotation, can you give more details? Do you mean that you would like to apply a rotation boundary condition to the root of the blade?
If so, then you need to apply a rotation boundary condition ("fixedRotation" is an option) to the solid at the blade root (the solid does not have a mesh motion solver as it uses a Lagrangian approach), and then you need to make sure the fluid mesh motion solver is capable of letting the fluid mesh be "pushed" around or even to specify the rotation of part of it.
I suggest creating a simple representative test case, probably 2-D to check it works.

Philip

Dimash May 3, 2021 06:23

3 Attachment(s)
Dear Philip,

Thank you for your response. I've tested a lot of possible implementations and this is what I found:

1) The solid part could be rotated using dynamicFvMesh solidBodyMotionFvMesh. I am not sure this is physically accurate, but simulations show accurate blade deformation due to gravitational acceleration when rotated with dynamicFvMesh solidBodyMotionFvMesh. I tried to rotate with staticFvMesh and applying fixed rotation to the hub of a wind turbine, but it looks like hub is rotated, but blades stay fixed. You can se it in the following figure, where white model is a simplified solid model of a wind turbine blade, and blank spots in the background show where blades should be located:
Attachment 84159

2) I've created a simple case to test the "pushing". The circular mesh is connected to the rest with GGI, and the solid model (white block):
Attachment 84161
However, block rotation makes the whole mesh to deform, ever if two fluid meshes are not connected:
Attachment 84160
I tried to specify the deformation region, but I did not find how to do it.

3) I've successfully simulated one-way FSI by generating wind turbine geometry with blockMesh. This solved almost all problems with interpolation from fluid to solid domains.

Now I am switching to two-way FSI. If I understand correctly, the only way to rotate fluid mesh and to deform it is to write new dynamicFvMesh, which combines both rotation effect and deformation due to FSI.

I want to ask you following questions:

1) Is it possible to specify which fluid regions are deformed during FSI and can I somehow fix the deformation at some distance from fluid-solid interface (to keep boundary layers untouched)?

2) Is creating new dynamicFvMesh solver is correct approach in my situations? I tried to rotate the fluid mesh only with solid "pushing" fluid, but the solid blade ends up with pushing the whole mesh, not only rotating region.

Sincerely,
Dinmukhamed

bigphil May 12, 2021 12:57

Hi Dinmukhamed,

For point 1), moving the solid mesh independently of the cell-centred displacement field does not really make sense, since they should come from the same displacement field. And this displacement field should satisfy conservation of momentum. You could just prescribe the solid mesh motion and cell-centred displacements (i.e. rigid rotation) but then there is no need to solve the solid equations since you already know the deformation.

I am not sure I understand why the approach does not work when you apply a rotation boundary condition to the displacement field at the hub. It might be useful to set up a solid-only model of one blade with a rotation applied at the hub and then check it deforms as expected. If this works then it should be possible to get it working with FSI.

For point 2), I believe there is some way to specify the rotation of a mesh region but I don't know off hand; see if Google can help :)

For your question 1 at the end: this is controlled by the fluid dynamic mesh; there should be some dynamic meshes the allow this.

For your question 2 at the end: this will depend on whether or not you can find an existing dynamic mesh the is suitable or not. if not then yes you could create one.

Philip


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