CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   How to define the inlet using an Interpolation Functions or Data sheet? (https://www.cfd-online.com/Forums/cfx/217527-how-define-inlet-using-interpolation-functions-data-sheet.html)

IronLyon May 15, 2019 11:01

How to define the inlet using an Interpolation Functions or Data sheet?
 
Hello , I want to use the mass flow rate as the inlet, before I just defined it as constant value or write in the expression and use a function. However, the function what I used is just an approximate fuction calculated from my experiment date, that was not realistic. So now I just want to input the time point and the correspond mass flow rate, like create an Excel data and then use choose the ''Tool'' - ''Initialize Profile Date'' to upload the excel data (is that true, I don't have experience)?
I will try that and want to know, what is the right form to write in the excel? Like:
Time point [s] mass flow rate [kg s-1]
0 0
0.5 1.25
1 2.1
1.5 3.2
2 3.9
...
I tried, but it said ''Invalid format''. How could I input the data in a right way? Thank you!

evcelica May 15, 2019 16:23

Just create a user function in cfx-pre.

You can either type in the data points, or import a text file with just 2 columns of data (numbers only). Define the units of the independent variable time [s] and result variable [kg/s]. Then use this function as your inlet mass flow condition: MyFunctionName(t)

AtoHM May 16, 2019 02:58

1 Attachment(s)
https://www.sharcnet.ca/Software/Ans....html#i1310599


I attached an example with variable mass flow. Once imported into pre you can reference the profile by its expression as MassFlowRate.Mass Flow Rate(Time) within the boundary setup.

IronLyon May 17, 2019 05:12

Quote:

Originally Posted by evcelica (Post 733728)
Just create a user function in cfx-pre.

You can either type in the data points, or import a text file with just 2 columns of data (numbers only). Define the units of the independent variable time [s] and result variable [kg/s]. Then use this function as your inlet mass flow condition: MyFunctionName(t)


:) Thank you!

IronLyon May 17, 2019 05:20

1 Attachment(s)
Quote:

Originally Posted by AtoHM (Post 733766)
https://www.sharcnet.ca/Software/Ans....html#i1310599


I attached an example with variable mass flow. Once imported into pre you can reference the profile by its expression as MassFlowRate.Mass Flow Rate(Time) within the boundary setup.


:)Thank you!
I succeed in using txt to write the fuction. The pic is shown as flowing:
Attachment 70000
And then in the inlet using the user function, after loading it likes
MFR.Mass Flow Rate(), then the only thing needs to be done is add the Time like MFR.Mass Flow Rate(Time).

IronLyon May 17, 2019 05:27

[solved and further question delete]

3nhu1 November 26, 2023 18:00

Quote:

Originally Posted by IronLyon (Post 733943)
:)Thank you!
I succeed in using txt to write the fuction. The pic is shown as flowing:
Attachment 70000
And then in the inlet using the user function, after loading it likes
MFR.Mass Flow Rate(), then the only thing needs to be done is add the Time like MFR.Mass Flow Rate(Time).

Many thanks- this helped me


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