Hi,

I have the following problem with Ansys Fluent Workbench 2019 R2. I am conducting a transient parametric simulation (I want to use the response surface) but I would like to eliminate the first two iterations from the calculation since they provide non-physical results while the following are correct.

how can I solve this problem?

I am currently printing the values in a .txt file and processing them without considering the first two lines.

A second question that derives from this problem: how can I write a UDF that calculates the Root Mean Square of incoming pressures and gives this result as an output parameter?

# How not to consider the first iterations in the parametric calculation in Fluent?

- 136 Views
- Last Post 18 November 2019

How are you printing? I guess you may create report definition per udf and ignore the first iterations. Same can be done within an expression with 2019R3.

Best regards, Amine

Thanks for the answer.

I print the pressure values compute in inlet (because in outlet I setted p=0); as you can see the first two values are incorrect:

Next, I calculate the Root Mean Square of each variable with MATLAB not considering the first two iterations.

This result is the variable that interests me.

I repeat this procedure for each simulation.

Finally, through Matlab, I get the response surface.

Surely I can automate everything, but I don't know how. With my procedure I can control the variables.

Is it possible to write a UDF (or some procedure) that allows me to calculate the RMS of the pressure variable without considering the two initial iterations? if so, how? are there some tutorials?

I can´t use the 2019R3 version because all project it is in 2019R2 version in the university.

Thanks very much

Check customization manual for UDF. In MATLAB you can write code to always ignore the first values. In Fluent you can 3an two iterations abdvtgen start writing files. You can autonate this via journal.

Best regards, Amine

And yiu directly access mean and RMSE values in Flyebt whenver you ebable statistics gathering.

Best regards, Amine

thank you so much,

but I am interested in defining the variables through the UDF as the RMS that calculates fluent does not convince me and has a different definition from the one I have to use.

Best Regards

Can you use an IF statement so that the UDF doesn't calculate anything until time > something?

Basic conditional treatment inside the routine.

Best regards, Amine

Yes,

I tried the IF loop in the UDF, but still calculates the values. As if it bypassed the cycle.

Regards

Thanks for your help,

I try with the road of Expressions.

IF(iter<=2, 0, sqrt(...))

Within sqrt (...) I would like to specify the sum of the pressure values calculated for each iteration.

How do I add up over time? It can be done?

Best regards

Look in the manual there are some example or in any c tutorial

Best regards, Amine

##### Search

##### Change Language

##### Categories

##### This Weeks High Earners

- peteroznewman 69
- Aniket 29
- abenhadj 27
- rwoolhou 20
- Kremella 19
- Wenlong 19
- kkanade 18
- tsiriaks 16
- Eric_Eric 9
- SandeepMedikonda 8