CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   setting up the custom laws for particle injection (https://www.cfd-online.com/Forums/fluent/74794-setting-up-custom-laws-particle-injection.html)

ljp April 8, 2010 11:33

setting up the custom laws for particle injection
 
Hi,

I'm confused about setting up the custom laws at the "set particle injection" panel, could anyone please clarify that for me?

I need to use the Fluent built-in inert-heating law and the vaporization law, and I wrote another user-defined law to change particle's diameter when certain conditions are met. I also wrote a dpm-switch udf. My question are:

1. About hooking the laws at the custom law panel: should I select inert-heating as the first law, vaporization as the 2nd law, and my user-law as 3rd law, then hook my dpm-switch; or, should I select my user-law as the first law, and make other entries (from 2nd law to 7th law) inactive?

2. About the dpm-switch udf: do I only include the condition to switch from vaporization law to my user-law, or do I also need to include the condition to switch between the built-in inert-heating and vaporization laws? In latter case, the controling parameter is DPM_VAPOR_TEMP(p,m), then how can I get the pointer m?

Any help or suggestions would be much appreciated. Thank you in advance!

ljp

ljp April 9, 2010 15:06

I tried several ways but none of them can give me correct field:

1. putting the inert-heating, vaporization law as the 1st and 2nd law, and my user-law as 3rd law, default dpm-switch ------ wrong results;
2. putting my user-law as 1st law, and make other laws inactive, using my own dpm-switch ------- wrong results;
3. putting my user-law as 1st law, inert-heating as 2nd law, vaporization as 3rd law, using my own dpm-switch ------- wrong results;

I think something is wrong with my dpm-switch udf, especially the part for switching between the built-in laws, I list the relavant part below. Has anyone used the custom laws before? could you help me here?

DEFINE_DPM_SWITCH(dpmlaw_switch, p, ci)
{
Material *m;

if(P_T(p) < DPM_VAPOR_TEMP(p,m))
P_CURRENT_LAW(p) = DPM_LAW_INITIAL_INERT_HEATING;
else if(specific condition)
{
if(P_T(p) < DPM_BOILING_TEMPERATURE(p,m))
P_CURRENT_LAW(p) = DPM_LAW_VAPORIZATION;
}
else
P_CURRENT_LAW(p) = DPM_LAW_USER_1;
}

Thanks a lot!

ljp

sreerao September 21, 2010 05:19

Hi IJP,

I am facing similar probelm with DPM_SWITCH. Did you find any solution for your probelm. Would you like to share it with me please?

Sreerao

ljp September 21, 2010 11:23

Hi Sreerao,

finally on the custom-law panel, I set the inert-heating law as 1st law, vaporization law as 2nd law and user-law as 3rd law. and included the switch between these laws. Then when I included the gravity effect and the breakup model, the results looks what I'd expect. But honestly I'm still not sure whether this is correct until I can have some experimental measurements done.

regards,
ljp

Sowmi February 6, 2018 04:59

setting up the custom laws for particle injection
 
hi Ijp
what was your 3rd user law other than heating law and vapourization law. Can you guide me to write the udf for custom law or any sample code. I studied the udf law example in udf user guide but it is very confusing.

Thank you in advance.


All times are GMT -4. The time now is 18:12.