|
[Sponsors] |
December 27, 2018, 15:24 |
Passing values to reference values from UDF
|
#1 |
New Member
Mohamed Saied Sayed
Join Date: Dec 2018
Posts: 5
Rep Power: 7 |
Hello everyone
I am simulating a re-entry vehicle at hypersonic speed and high altitude (80 KM). I use a UDF to calculate the pressure profile and using ideal gas. I use transient solver. So the question I would like to ask you is: How to pass the calculated pressure value from the UDF to apply at the REFERENCE VALUES at each time step? Thanks |
|
December 28, 2018, 11:37 |
|
#2 |
New Member
Join Date: Jun 2018
Posts: 8
Rep Power: 8 |
Do you want the reference values to be used in your next calculation of your UDF or do you mean the reference values Ansys uses for post processing?
|
|
December 28, 2018, 12:12 |
|
#3 |
New Member
Mohamed Saied Sayed
Join Date: Dec 2018
Posts: 5
Rep Power: 7 |
I want the calculated pressure value from the udf to be set to the reference value for the next post processing
|
|
December 28, 2018, 12:14 |
|
#4 |
New Member
Mohamed Saied Sayed
Join Date: Dec 2018
Posts: 5
Rep Power: 7 |
Simply we can say that the reference values doesn’t update according to the calculated values from the UDF and i want to ubdate it every time step
|
|
December 28, 2018, 13:18 |
|
#5 |
New Member
Join Date: Jun 2018
Posts: 8
Rep Power: 8 |
Okay and which DEFINE Marco are you using ?
|
|
December 28, 2018, 13:26 |
|
#6 |
New Member
Mohamed Saied Sayed
Join Date: Dec 2018
Posts: 5
Rep Power: 7 |
DEFINE_PROFILE(pr_mag, thread, position)
|
|
December 30, 2018, 20:43 |
|
#7 |
New Member
Join Date: Jun 2018
Posts: 8
Rep Power: 8 |
I am not sure if there’s a very direct way to do this. You might want to look into DEFINE_EXECUTE_AT_END.
|
|
December 30, 2018, 22:24 |
|
#8 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
As RCamp mention you should use DEFINE_EXECUTE_AT_END macro, if you want to make calculation after timestep. DEFINE_PROFILE is macro to set boundary condition.
about your first question: What is your exact question, are you just lazy to set reference values manually, if yes, it means you don't really need to update it on each timestep. In that case you may create scheme file, which will read some value from your UDF and apply it to reference value: 1. using TUI command you may apply reference value. Type in fluent console " report reference-values pressure *SOME VALUE* " 2. workflow: - create variable in scheme - calculate pressure in UDF - set scheme variable value - execute scheme file, which will run TUI command, using scheme variable value with reference pressure best regards |
|
December 31, 2018, 09:09 |
|
#9 |
New Member
Mohamed Saied Sayed
Join Date: Dec 2018
Posts: 5
Rep Power: 7 |
Hello Alexander
Thanks for your help but my reference variables change every time step according to the calculated values from the UDF so if you have a code that can do that i will be so thankful |
|
Tags |
reference -values, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Domain Reference Pressure and mass flow inlet boundary | AdidaKK | CFX | 75 | August 20, 2018 06:37 |
Simulation of a single bubble with a VOF-method | Suzzn | CFX | 21 | January 29, 2018 01:58 |
Periodic (rotational)flow: a bit of confusion concerning reference values | Mr.Goodcat | FLUENT | 0 | March 22, 2016 08:31 |
compile error about FJMPI | chiven | OpenFOAM Installation | 11 | March 31, 2010 07:27 |
G95 + CGNS | Bruno | Main CFD Forum | 1 | January 30, 2007 01:34 |