# Turbolence Models

Hello, its since November '21 that I am enjoying the precious work done by the NVidia devs about the Pinns, DeepONet and other wanderful hybrid model and data driven models.

I need the pde describing the turbolence model known as k-omega. I am pleased that you have a 2-d customization (inside the turbolence_channel example).
There are 2 custom k-omega rubolent custom pdes (both in two dimentions). If I got the difference correctly among thems, the difference is that one has symbolic u_tau and the other has explicit k values, right?

In the example of such problem Fully Developed Turbulent Channel Flow - NVIDIA Docs , the pdes written (188-189 formulas) have the time included, however looking at the code there are not symbolic variables “t” involved in the computations.
I need to adapt the k-omega model in 3-Dimentions (having the 2-D is already a great start! thx) and that would incldue the time; adding a spatial dimention is pretty stright forward, however I am not sure where i should incldue the variable ‘t’.
Greetings,

P.S. when it will be next release, and where can I find a “road map” or something similar? :D

1 Like

For these channel flow problems, we are solving for steady state case (fully-developed channel), so the time derivatives go to zero. Note that the network that predicts the flow only depends on the spatial coordinates relative to the wall (not time). You will need to include time if you are planning to try to learn a transient solution, but this is considerably more difficult. Good luck!

I am more a computer scientist myself rather than a physicists, so my comprhension of PDE is not perfect. Nonetheless I have tried to implement the transient solution for the k-omega model, including time and the third spatial dimention.
The simplest PDE tried to inform a NN is the following (it is a chunk of code inside a class that inherit from the Modulus PDE class)

``````k = Function("k")(*input_variables)
omega = Function("omega")(*input_variables) #om_plus

mu_t = k * rho / (omega + 1e-4)
#Constants for the k-omega model
sigma_k = 0.5
sigma_omega = 0.5
beta = 9 / 100
F_1 = 0
alpha = 5 / 9

# Term for the production of kinetic turbolent energy adapted for the 3rd dimention
P_k = (
2 * u.diff(x) ** 2
+ 2 * v.diff(y) ** 2
+ 2 * w.diff(z) ** 2
+ (u.diff(y) + v.diff(x)) ** 2
+ (u.diff(z) + w.diff(x)) ** 2
+ (v.diff(z) + w.diff(y)) ** 2
)

self.equations = {}

#k equation
self.equations["k_equation"] = (
(rho * k).diff(t)         #time component
+ (rho * k * u).diff(x)
+ (rho * k * v).diff(y)
+ (rho * k * w).diff(z)   #3rd dimention
- ((nu + sigma_k * mu_t) * k.diff(x)).diff(x)
- ((nu + sigma_k * mu_t) * k.diff(y)).diff(y)
- ((nu + sigma_k * mu_t) * k.diff(z)).diff(z)  #3rd dimention
- P_k
+ beta * rho * k * omega
)
#omega  equation
self.equations["omega_equation"] = (
(rho * omega).diff(t)     #time component
+ (rho * omega * u).diff(x)
+ (rho * omega * v).diff(y)
+ (rho * omega * w).diff(z)  #3rd dimention
- ((nu + sigma_omega * mu_t) * omega.diff(x)).diff(x)
- ((nu + sigma_omega * mu_t) * omega.diff(y)).diff(y)
- ((nu + sigma_omega * mu_t) * omega.diff(z)).diff(z) #3rd dimention
- 2 * (1 - F_1) * rho * sigma_omega * (
k.diff(x) * omega.diff(x)
+ k.diff(y) * omega.diff(y)
+ k.diff(z) * omega.diff(z) #3rd dimention
) / (omega + 1e-4)
- ((alpha * rho) / mu_t + 1e-4) * P_k
+ beta * rho * omega * omega
)

``````

However is not converging to anything good (I’ve set lambda wheits very high, maybe that’s the problem?)
Does the previous code really represent a close implementation of the k-omega model in 3 dimentions with transient solution?

Yes the K-Omega model is the form from standard turbulence literature. Regarding convergence problems, this could be from a multitude of sources. I would highly suggest trying to simplify the problem and the slowly building up to you 3D case, particularly if you’re not completely familiar with the underlying PDEs. Its good to confirm results for smaller problems to sanity check problem set ups.

For our 3D problems we use a lot of techniques to improve convergence. Check out the recommend practices section of the documentation with some ideas (e.g. Integral continuity planes).