Accessing Solver data for UDF
Hello:
I am using an two phase eulerian model. Liquid in air. I want to obtain the cell pressure within the liquid region. I operate a source function in the liquid domain. If I use pvalue = C_P(c,t), do I get mixture static pressure,If not what ? Again, If I use C_K(c,t) for turbulent kinetic energy, I am not sure what am I actually accessing? I am not clear how to identify my zone and how to obtain cell values for liquid and gas separately. Please help CFDtoy |
Re: Accessing Solver data for UDF
I think you should make sure the thread is in mixture level. Then you can get the mixture pressure with C_P. To access phase, you can use thread_sub_thread to obtain the thread for each phase. I am working on the UDF too. Here is my code to access the phase. Hope it well help.
int ID = 6; /* Zone ID for wall zone from Boundary Conditions panel Obtain the zone ID from boundary condition panel */ t_m = Lookup_Thread(d,ID); /* mixture level thread */ t_g = THREAD_SUB_THREAD(t_m, 0); /* gas phase thread */ t_s = THREAD_SUB_THREAD(t_m, 1); /* solid phase thread */ Tim |
Re: Accessing Solver data for UDF
Hi,
Could you use export in the file to find all data including you want? |
Re: Accessing Solver data for UDF
Hi Li: Thanks for your reply. I would like to use add a momentum source only in the liquid portion of the liquid-gas mixture.
Now this source is volumetric and is not applied across the boundary. source definition reads DEFINE_SOURCE(name, c ,t , dS, eqn) etc I would like to add source based on the liquid static pressure. Now this source is computed in all the cells..well, i need to find out C_P only for cells with liquid. as you put it ..i guess using the zone ID would be a good idea. But again, my basic question is ..if I dont do any thread evaluation..and perform just C_P(c,t)..what do i get ? Thanks CFDtoy |
Re: Accessing Solver data for UDF
Sorry, I don't know how to exprot. Actually, I am newbie in UDF.
Tim |
Re: Accessing Solver data for UDF
I think it depends on what the thread 't' is passed by the Fluent solver. If you are not sure, you can get the domain that owns that thread with THREAD_DOMAIN(t), then compare the domain id with the ID number in Define/Phase panel. Or just output some variables of thread t to judge. Do I answer your question? Hope I do.
Tim |
Re: Accessing Solver data for UDF
Hi,
In the menu "File" =>"Export". |
Re: Accessing Solver data for UDF
I usually export my data to Tecplot to plot or analyse.
|
All times are GMT -4. The time now is 22:35. |