CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Asynchronous iteration of UDS and turbulent flow? (https://www.cfd-online.com/Forums/fluent-udf/239608-asynchronous-iteration-uds-turbulent-flow.html)

ziyixy November 15, 2021 09:39

Asynchronous iteration of UDS and turbulent flow?
 
Hi all

I want to solve an unsteady UDS equation 100 times in one iteration of turbulent flow, e.g., the time step in UDS_UNSTEADY is 0.01 s, while the timestep in turbulent flow is 1 s. Could anybody tell me how I can achieve it? Thanks in advance.

Besides, if the timestep in UDS and flow is different, the time between C_STORAGE_R(c0,t,SV_UDSI_M1(i)) and C_STORAGE_R(c0,t,SV_UDSI_M2(i)) is 0.01 s or 1 s?

I got an idea to set the timestep in 0.01 s in both UDS and turbulent flow, and switch off the turbulent equation unless the UDS is solved every 100 times. Is it accessible and how can I do it?

Many thanks.

AlexanderZ November 16, 2021 00:08

make 1 time step
change computational scheme from transient to steady state
turn off all equation except UDS
run 100 iteration
turn on flow equation
switch to transient

repeat workflow

you can script it in journal file and run automatically using execute commands
or there are more complex solutions using scheme language

ziyixy November 18, 2021 08:58

Quote:

Originally Posted by AlexanderZ (Post 816630)
make 1 time step
change computational scheme from transient to steady state
turn off all equation except UDS
run 100 iteration
turn on flow equation
switch to transient

repeat workflow

you can script it in journal file and run automatically using execute commands
or there are more complex solutions using scheme language

https://i.loli.net/2021/11/18/xUmdArJeXL8hHEk.jpg

Thanks Alexander. I attached the UDS equation, which is vortex sound equation. The p is acoustic pressure. Due to it contains an unsteady term, I cannot switch to steady. Using execute commands, I found that the S0 (acoustic pressure) remains unchanged when turning off flow/turbulence equations. I guess this is because the flux in the inlet and outlet was set as 0. I have another two questions. Thanks for your help.

1- The S0 at the inlet/outlet is satisfied to dS0/dt+gradient S0=0. How can I achieve it via UDS? Do the S0 still remains unchanged?

2-The gradient u^2 is calculated through C_UDSI(c0,t,1)= u^2, dm1=C_UDSI_G(c0,t,1)[1]. There is a redundant scalar-1 C_UDSI(c0,t,1). If I turn off the scalar-1 equation, the contour of S0 seems unphysical compared to keeping scalar-1 solved. When the scalar-1 equation turns on, the flux function, unsteady function, source of the scalar-1 is none, and the diffusivity is 0, the divergence error occurs. However, when setting diffusivity of scalar-1 is 1, it runs well and the contour of s0 can be more related to real conditions. So, how should I do?


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