Fluent Transient velocity inlet UDF

  • 73 Views
  • Last Post 4 weeks ago
FabioCauchi posted this 06 July 2018

Hi, 

 

I'm currently having a problem getting the velocity inlet in my Fluent project to work as I wish. Maybe you may help. 

 

The boundary conditions are set as shown in the figure attached (the wall section is a simple airfoil section on a tube).

 

 I want the velocity to increase from 5m/s to 50m/s with time during the transient simulation so that the winglet is not instantly loaded with large aero loads. this way the FSI simulation is more gradual and stable. 

 

Through a simple UDF I managed to get the velocity to increase with time but this is in turn creating a problem in static pressure (gauge) as shown in the second and third figures attached. 

 

I tried several methods to fix it but i m ending up with the same problem all the time.  

 

Do you have any idea how this can be fixed please? 

 

Thanks in advance,

Fabio Cauchi

Attached Files

Order By: Standard | Newest | Votes
abenhadj posted this 06 July 2018

Hi,

Are you doing a co-simulation or just one way FSI?

For the case you are running Fluent only you have to ensure that the flow accommodate itself to the inflow change by scrutinizing the convergence and letting the flow settle in. You might need to increase the number of iterations per time step, switch off convergence by residual and check the transient behavior of some key parameters at some control points /surface/lines in dependency of the iteration. The profile of that monitor has to reach a non-changing level towards the end of each transient/time step.

 

A.

Best regards

FabioCauchi posted this 06 July 2018

Hi,

I'm running this transient simulation in a stand alone fluent component to eliminate all other coupling complications for now. I am making sure that the flow conditions are converging with every time step (also tried 500 iterations per time step where residuals went constant for a long time) and i m monitoring lift and drag as physical values and they are converging with every step increase in velocity (5, 10, 15 ... 50). 

I can't understand the static pressure increase at the inlet. the operating conditions are set at a pressure of the default 101325Pa and not changing with time steps.

Thanks appreciate your help.

 

abenhadj posted this 06 July 2018

Hi,

I do not understand your static pressure plot: In which direction is it pointing.

Are you using ideal gas for you fluid or just constant density? If ideal gas I would recommend using a total pressure inlet or far-field boundary.  With far-field you can then get ride of the top and bottom symmetry.

Generally one would place the boundaries at a distance not smaller then 20 times the chord of wings.

 

A.

Best regards

FabioCauchi posted this 06 July 2018

Hi,

Since case is at low velocity the fluid is incompressible (constant density). No ideal gas formulation and energy equation is off. I tried with far fields and ideal gas but since the flow is so slow it is difficult to converge and produce good results. 

The static pressure plot is the result of when the velocity at inlet is a 15m/s. This means that the udf works and the velocity increases as desired. the problem is that the static pressure result is not making physical sense. 

now i'm looking into differences between udf s ran in serial or parallel fluent setting since apparently it does make a difference, but it is just another thing i m trying after many others.

My domain might be a bit small but i don t think it effects the problem, what do you think?

Maybe you've encountered a similar problem somewhere and can point me in the right direction.

Thank you.  

Raef.Kobeissi posted this 07 July 2018

What's your Reynolds number (in average) low velocities could make the solution harder to converge in RANS. Can you also provide a schematic of your case, just more information to understand the case better.

Regards

Raef Kobeissi

FabioCauchi posted this 10 July 2018

Hi,

My Reynolds is about 600,000. The case is a simple cantilever wing in a free flow domain with a flow of 50m/s. Rans model is Realizable Ke with standard wall functions and y+ > 30. I'm using a first order coupled solver, Pressure based and transient. Timestep of 0.002s My main problem is that the setup works fine if I run it at 50m/s constant speed in the inlet velocity field. The problem arises when I try to include the udf to ramp the velocity.

Thanks for you help.

abenhadj posted this 4 weeks ago

Hi,

Just allow the flow to establish itself whenever you are using a ramping function by increasing the number of iterations per time step and ensure deep convergence within each time step.

 

A.

Best regards

FabioCauchi posted this 4 weeks ago

Hi, 

Thanks for the answer, 

I tried this and left it too settle for even ridiculous amount of iteration per time step to be sure, and still got the same weird result.

Regards.

abenhadj posted this 4 weeks ago

Hi,

Please attach your UDF and case. Please attach the Residual convergence history.

 

A.

Best regards

FabioCauchi posted this 4 weeks ago

Hi,

The following are some pictures of what you want to see. How can i send you files apart from pictures here please? or an email address?

Thanks for your time.

 

Residuals

 

Massflow - Velocity increase

Lift - Physical convergence monitor

 

Static pressure - gradient problem

abenhadj posted this 4 weeks ago

Hi,

The continuity residual is still high and quite stalling although the other reports are showing convergent behavior towards the end of the transient. What about a screenshot of your UDF? 

 

A.

Best regards

FabioCauchi posted this 4 weeks ago

Hi,

Continuity goes below e10-3 once more time-steps are ran for the same final velocity (as expected).

Attached please find the UDF used. I also tried the transient table method (file screenshot also attached). This method creates a udf internally.

Thanks

UDF:

Transient Table:

abenhadj posted this 4 weeks ago

Hi,

You said you were able to run with 50 m/s from scratch. From the UDF or Transient Table the maximum velocity is 15 m/s. Please verify your statements here.

Transient run depends on the initialization but might lead to steady-state result with might correspond to a case which is run without ramping. I do just highlight "might" as flow hysteresis and numerical inconsistencies.

Please scrutinize the area where the pressure profile is not behaving as it should by showing the plot every time-step and check the contour of pressure on walls of the airfoil directly.

I hope that community members might help you here further.

Best regards

FabioCauchi posted this 4 weeks ago

Hi, 

I ran it until 15m/s just because until 50m/s it is the same story every timestep. 

As I mentioned earlier, the first time step results in a good pressure distribution but all goes wrong from the second time step onwards (first time step is at 5m/s and initialization is done with a reference velocity of 5m/s). In all the other timesteps, the pressure on the airfoil does show a good shape but it is overlayed by the un explained pressure gradient as shown in the static pressure graph above. 

Thanks and Regards,

Fabio Cauchi

abenhadj posted this 4 weeks ago

Hi,

For spatial profiles, Fluent uses a zeroth order interpolation, but for a transient profile, Fluent uses a linear interpolation. So Fluent would interpolate between the time steps.That is why I would rather either introduce some additional time levels or use smaller time step size.

I hope that community members might help you here further. As an ANSYS Employee I cannot help you further on this open community.

A.

Best regards

Close