CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Perturbation to a Steady State Solution, how to? (https://www.cfd-online.com/Forums/fluent/148629-perturbation-steady-state-solution-how.html)

ash_n February 16, 2015 06:56

Perturbation to a Steady State Solution, how to?
 
Hey all!

So I am modelling a simple Laminar 2D Pipe flow in Fluent, (which I am new to btw). So, once I solve for the transient case for a certain timesteps and I get more or less a steady state solution, I want to introduce a pressure perturbation at the inlet and wanna gauge the response of the fluid. How can I go about doing this in Fluent?

Kindly suggest a simple method for this.

Regards.

rohitkjohn October 17, 2017 07:46

introducing a perturbation
 
Hello,

If you want to introduce a perturbation by changing the boundary condition, I would suggest you use a UDF. The following is a code which you can save as a .c file and compile in FLUENT


/* the following UDF imposes a value of pressure p0 at the required boundary before time t1. Once t1 is crossed the this a perturbation is introduced in the form
of an increased pressure, p1, at the boundary. This is done using an if-else condition
*/

#include "udf.h"

DEFINE_PROFILE(unsteady_pressure, thread, position)
{
face_t f;
real t = CURRENT_TIME;
real t1 = 0.1; /*The time after which you want to add the perturbation*/
real p0 = 200; /*This is the initial pressure you impose at the boundary*/
real p1 = 210; /*This the perturbed value of pressure*/

begin_f_loop(f, thread)
{
if(t<t1)
{
F_PROFILE(f, thread, position) = p0;
}

else
{
F_PROFILE(f, thread, position) = p1;

}
}
end_f_loop(f, thread)
}

rohitkjohn October 17, 2017 07:47

you may search online how to add a UDF to FLUENT


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