Write user-defined scalar into .res file for postprocess

I am a new user. I realize that we can output user scalar in res files but I do not know how to set, and only find the output selection in GUI.
Does anyone has any experience on this?
Thank you very much!

1 Like

Your question isn’t clear.

  • If you are solving additional scalars that are convected with the fluid (i.e., you add new scalar transport equations to be solved via the Scalars pane in the GUI), then you can adjust the write frequency of the scalars you added in the Output pane.

  • If you are you asking about storing some other quantity (e.g., a user calculated value), then the easiest approach is to store the values the ReactionRates array. Despite the name, this is just a generic array were you can place data for IO. No values stored in the ReactionRates array are used in any calculations in the code. The size of the ReactionRates array is set in the GUI on the Model setup pane as ReactionRates array size. You then need to write a user-defined function to calculate whatever value you want and store it in the ReactionRates array. The write frequency of the ReactionRates array is controlled in the Output pane.

3 Likes

Thanks a lot. Both of the aspects you said are helpful, especially for the second part. I will have a try.

1 Like

Hi, Dr. Musser

Lacking relevant experience about using scalar transport equations, i would like to ask you what is the main usage of this kind of equation? For additional field variables that can be derived from basic field variables, such as velocity and pressure, temperature, concentration,etc, are these two methods you mentioned equivalent? I mean that the solutions obtained by solving scalar equations of the derived field variables can also be obtained by post-processing the output field data.