DPM Source behaviour

  • 21 Views
  • Last Post 21 May 2020
Surya posted this 21 May 2020

Hi,

I am working on DPM to model the adsorption of gas by solid and I have written an UDF to model the mass transfer between the phases using DPM_LAW macro and I used the DPM_SOURCE macro to include the source term in the continuous phase. I also included Message0 statements in the macro to display the source terms during DPM iteration. 

My question is even though I specified the energy source to be 0 in the macro, Fluent includes a large value for the energy source term, which is evident from the value of S->energy, printed on the console. 

I tried searching in the internet for possible explanation but I was unable to find one.

 

 

Could you please help me understand why this is happening?

My UDF is 

DEFINE_DPM_SOURCE(dpm_source,c,t,S,strength,p)

{

real mp_dot;

j += 1;

Message0("\n source UDF iteration %d",j);

mp_dot = (P_MASS0(p)- P_MASS(p))*strength;

Message0("\n strength = %f",strength);

Message0("\n********************************************");

Message0("\n mp_dot is %f",mp_dot);

 

S->species[h2o_index] += mp_dot;

S->mass += mp_dot;

S->energy += 0.0;

Message0("\n S->species[h2o_index] is %d",S->species[h2o_index]);

Message0("\n S->species[o2_index] is %d",S->species[1]);

Message0("\n S->species[n2_index] %d",S->species[2]);

Message0("\n S->mass is %d",S->mass);

Message0("\n S->energy is %d",S->energy);

Message0("\n The initial mass of the particle is %f",P_INIT_MASS(p));

Message0("\n *******************************************");

}

And I got the following output in the console when I simulated it

********************************************

 mp_dot is -0.001183

 S->species[h2o_index] is 1645000492

 S->species[o2_index] is 0

 S->species[n2_index] 0

 S->mass is 1645000492

 S->energy is -1295233992

 The initial mass of the particle is 0.000101

 

About my model:

I am using 2D steady state simulation for the flow and the discrete phase with interactions with the continuous phase enabled. I am using an inert particle for the DPM with a single point injection. 

Thank you in advance.

Regards,

Surya

rwoolhou posted this 21 May 2020

If you check the manual carefully you'll find Fluent has a default temperature for when mass sources are used. I suspect it's linked to that.  

Close