I am currently working on a multiphase FSI simulation of the dambreak problem where the water will impact onto a flexible beam. Attached is the picture. I am having an issue where the moment the water impact onto the flexible beam, the time step become prohibitively small until the simulation crash (t=0.11). I am not very sure of the cause of the problem. Inside the fluid-open foam solver setting of the 0 folder, I am not 100percent sure of the boundary condition inside the pointDisplacement file. I have used the following settings:
boundaryField
{
interface
{
type fixedValue;
value $internalField;
}
leftWall
{
type slip;
}
rightWall
{
type slip;
}
lowerWall
{
type fixedValue;
value uniform (0 0 0);
}
atmosphere
{
type fixedValue;
value uniform (0 0 0);
}
defaultFaces
{
type empty;
}
}
The attached picture shows the timestep at which the simulation crash. (the time step becomes too small) Also, my another concern is regarding about the openfoam adapter. I have a look inside the Forcebase.C file of the FSI module. I noticed that the pressure forces are calculated by searching for the ‘p’ variable at the beginning. However, in the case of interFoam, p_rgh is defined inside the 0 folder. I am not sure if this will cause any issue with the coupling. That we should use the p_rgh variable instead of the p variable?
However, it is noted that the coupled simulation was able to run smoothly for a while.
The precice-config file was set up similarly as the one used inside the official tutorial perpendicular flap case. Please advise if you know how to resolve the issue. It should also be mentioned that solids4Foam is used as the structural solver. A linearElastic model was used to model the beam.
I realized we have not yet documented this option, but you can find out the exact option by looking at this part of the code:
I opened a related issue to update the documentation with everything FF-related soon.
Other than that, maybe people that have done similar multi-phase simulations in the past (e.g., @Jianzhou722, @Alphaoo1, @bitronteofil, or @Michael) could also help here. See also a few related topics:
I noticed that the lines of code you have pointed me to are implemented inside the Fluid-Fluid Coupling module. I was wondering if this matters for the FSI module. I am running a FSI case.
Or that the lines of code from FF module should be added to the FSI module?
I have finally identified the issue of the cause of the crash. It is due to the time stepping size. To get the simulation working, I have actually set a much smaller tilmestep size of t=0.0001 in the controlDict of the fluid and solid cases. Also, the timestep set in the precise-config.xml file has to be set to t=0.0001 for the simulation to run stably. It. seems that for the FSI module, the use of the p variable to compute the pressure forces are correct for the interFoam solver (as well) because the p variable is generated after time step 0. I also added a p file inside the 0 folder where the boundaries are set to calculated. So the p variable can indeed be found and is used in the coupling.
I am still investigating how the tilmestep size cane be increased without having the issue of sub cycling in the FSI simulation, which would cause the FSI simulation to crash after some time. If you have any suggestions as to how the settings for the coupling or interpolation inside the precice-config file can allow for larger time steps, please let me know.
Attached is the config file. I did not change anything much except for the timestep (time window size) = 0.0001 and the max time value = 1.0 which is the final time of the simulation.
I am not sure what else you need to do to improve the situation. Probably not much in terms of the acceleration, but maybe the problem is in the coupling setup itself: what you are coupling, how you are setting boundary conditions, etc.
I was able to circumvent this issue by setting the adjustTimestep inside the controlDict of the fluid side to ‘No’. I was able to use a larger timestep without blowing up the simulation. For some reason, when the adjustable timestep is set to ‘Yes’, it somehow trigger the sub cycling behaviour on the fluid side. And then I get the message: ‘sub cycling not fully supported and may cause instabilities’. But the thing I don’t understand is why the timestep just get smaller. I checked the Courant number and the interface Courant number and yet it is much below the specified value in the controlDict.