Post reply

Note: this post will not display until it's been approved by a moderator.

Message icon:

Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

shortcuts: hit alt+s to submit/post or alt+p to preview

Topic Summary

Posted by: william
« on: August 19, 2012, 08:25:23 AM »

This looks fine but you should use user defined scalar as defined above to store the particle property instead of using UDM, because UDM will store it in the cell not in the particle tracks.
Posted by: skhashan
« on: August 18, 2012, 11:23:31 PM »

I used three scalers. Compilation is sucsseful
I appreciate if yould check the way I am assigning the properties for three diameters (1e-6, 2.8e-6 and 4.5e-6 m)
Also, is there a better way to retrieve HMAG_p


DEFINE_DPM_SCALAR_UPDATE(magnetic_properties, cell, thread, initialize, p)
cphase_state_t *c=&(p->cphase);
   float MSAT_Myone,MSAT_M270,MSAT_M450;
   float FUNCH2, HMAG_p,CHI_p;
if((P_DIAM(p)>=0.99e-6) && (P_DIAM(p)<=1.01e-6)){P_magnetic_sat(p)= MSAT_Myone,P_magnetic_chi(p)=1.4; }
if((P_DIAM(p)>2.79e-6) && (P_DIAM(p)<2.81e-6)){P_magnetic_sat(p)= MSAT_M270,P_magnetic_chi(p)=0.17; }
if((P_DIAM(p)>4.49e-6) && (P_DIAM(p)<4.51e-6)){P_magnetic_sat(p) = MSAT_M450,P_magnetic_chi(p)=0.25; }

if (HMAG_p < P_magnetic_sat(p)/P_magnetic_chi(p))
       P_magnetic_fuch(p) =P_magnetic_chi(p);
          P_magnetic_fuch(p)=P_magnetic_sat(p) / HMAG_p;
Posted by: william
« on: August 18, 2012, 01:36:35 PM »

You can define that inside the equation using "if and else" statements, like,

if (P_DIAM(p)<=XX.X){
}else if(P_DIAM(p)>=XX.x){

and so on..
Posted by: skhashan
« on: August 17, 2012, 05:53:02 PM »

great william, you are making me closer to solve the problem
However,  to make my problem more understandable i must say that these properties are supposed to be different for each injected particel size.  I  am injecting three different particle diameters, each particel size is supposed to have its own distinctive magnetic saturation and magnetic susceptibility. Appreciate your help
Posted by: william
« on: August 17, 2012, 09:52:46 AM »

Inside the DPM_SCALAR_UPDATE macro you can use user defined scalar to store the property of material at each time step. You can even plot the trajectory of that property in the particle tracks option.
You will need to enable user define scalar in fluent.
To add it in the UDF, just after the header line #include "udf.h", add the following:

#define P_magnetic_sat(p) P_USER_REAL((p),0)
for second user defined scalar, add
#define P_magnetic_sat1(p) P_USER_REAL((p),1)

and so on.

Then in the DPM_SCALAR_UPDATE macro add the equations that define P_magnetic_sat(p) and P_magnetic_sat1(p)

In this case you will need to enable 2 user defined scalars.
Posted by: skhashan
« on: August 16, 2012, 05:54:37 PM »

Thanks Wiiliam. But here I am talking about a property that is not a standard macro
Posted by: william
« on: August 16, 2012, 11:29:20 AM »

Use DEFINE_DPM_SCALAR_UPDATE macro to change the property of the particle.
See Fluent UDF manual for examples of DEFINE_DPM_SCALAR_UPDATE.
Posted by: skhashan
« on: August 14, 2012, 08:24:10 PM »

Hello all,
Does any one know how to attach a assign a particel with a distinctive property. The diameter, mass, density, temerature, etc.  are assigned automatically to each particel type  (example P_DIAM(p) for diameter). But, I am interested in assigning other destinctive properties like magnetic saturation and magnetic susceptibility. Appreciate any help