# Is there an algorithm for real-time fluid simulations with Fluid-structure interaction with viscous fluids?

I'm trying to write a Fluid simulator for my school coding project. I want the Fluid simulator to be able to handle FSI with viscous Fluids in real-time and be 3D. I've been reading a few papers and usually the solutions tend to be some of the criteria and not all. For instance, I have seen a lot of solutions that allow real-time FSI but assume the Fluid is inviscid. Is there such an algorithm to simulate FSI in real-time without having to assume no/negligible viscosity?

• As the answer by Tofi pointed out, high viscosity is your friend, not your enemy. A low viscosity fluid basically "remembers" what happened to it in the past. What you want to simulate (if you want it to run in real time on a single computer) is a fluid that has high viscosity (like oil or honey) because then small perturbations are dying out rather than being amplified. May 20, 2023 at 23:16

I'm not familiar with problems of fluid-structure interaction, but perhaps I can still give you some insight into the issue. The thing is, three-dimensional viscous flows are usually quite expensive to simulate due to turbulence. In a turbulent flow, large eddies break down into smaller and smaller eddies, in a process known as the Richardson cascade, until they reach a very small size called the Kolmogorov length scale $$\eta$$ at which the energy is dissipated into heat by viscosity.

Intensity of turbulence is measured roughly by the Reynolds number which is defined as $$Re = \frac{UL}{\nu},$$ where $$U$$ and $$L$$ are characteristic velocity and length scales of the flow, and $$\nu$$ is the kinematic viscosity. Flows with a large Reynolds number are very turbulent, while flows with a small Reynolds number can be laminar. One can show that the ratio of the largest eddy size in the flow $$L$$ to the smallest eddy size $$\eta$$ is proportional to the Reynolds number raised to 3/4: $$\frac{L}{\eta}\propto Re^{3/4}$$

This means that in order to properly resolve the smallest eddies in a 3D turbulent flow simulation, the number of grid points needs to scale as $$N \propto \left(Re^{3/4}\right)^3 = Re^{9/4}.$$ For a flow with a velocity scale $$U = 1$$ m/s, a length scale $$L = 1$$ m and a kinematic viscosity $$\nu = 1.5\times 10^{-5} \text{ m}^2/\text{s}$$, the Reynolds number would be around $$Re = 70,000$$, which means that $$N$$ would be in the range of 80 billion. Thus, realistic turbulent flows are infeasible to simulate except using supercomputers and even then are still limited to very simple academic flow configurations.

So, unless you have access to large computing resources, I think that any program you write has to be limited to very low Reynolds numbers if it were to simulate real physics accurately, and even then it would be hard for it to run in real time.

• On the upside the simulation of the flow of honey around round structures is trivial in terms of computational resources according to this estimate, isn't it? May 20, 2023 at 23:11
• @FlatterMann I guess so :)
– Tofi
May 20, 2023 at 23:20
• So if I was to limit the program to very low Reynolds numbers, what impact would that have on the simulation? Like does it just mean that the kinematic viscosity will be really high or are there other indirect problems that can arise? In addition, a few days after posting this question, I found this paper: researchgate.net/publication/…. Does it still suffer from the same problem and if not how does it resolve it? May 21, 2023 at 12:06
• @SidKT from the expression above of the Reynolds number, a small Reynolds number can be achieved by decreasing the flow velocity $U$, decreasing the size of the flow domain $L$, or increasing viscosity $\nu$. The paper you linked has the same problem: for the simulation to be able to resolve motions at the smallest scales, the size of the fluid particle needs to be less than the Kolmogorov length scale.
– Tofi
May 21, 2023 at 13:56
• @SidKT However, I think the authors of that paper are more focused on producing "real"-looking animation rather than accurate physics, and if that's what you want then maybe there are some shortcuts that you can take, but I'm no expert on computer animations.
– Tofi
May 21, 2023 at 13:57