Can I define concentration of species instead of mass fractions in BCs?

  • 50 Views
  • Last Post 16 October 2019
khalidb77 posted this 13 October 2019

 

Dear Users

I am using the species transport model and I want to set the concentration of species at the boundaries as kg/m3 unit instead of the species mass fractions which appear in the picture? Is this possible?

 

 

  

 regards,

Khalid

 

Order By: Standard | Newest | Votes
abenhadj posted this 14 October 2019

Yes. You will need to create an expression based on the concentration which translates into mass or molar fraction and use that as value.

Best regards,

Amine

abenhadj posted this 14 October 2019

Mass fraction is molar weight of component x concentration/mixture density.

Best regards,

Amine

khalidb77 posted this 14 October 2019

Thanks abenhadj for the answer. You mean I need to write a udf for the concentration in terms of mass fraction? If you mean that I think Fluent just offers to set the mass fraction as a constant on the wall boundary no user-defined option exists (see the picture below please)? 

 

abenhadj posted this 14 October 2019

Yes UDF or using the new Fluent Expression capability.

Best regards,

Amine

khalidb77 posted this 14 October 2019

OK many thanks. But honstly I do not have an idea which macro I need to start the UDF? is it a DEFINED_PROFILE, DEFINE_PROPERTY or DEFINE ADJUST or what else that represents the concentration of the species? 

rwoolhou posted this 14 October 2019

It'll be define_profile, but you'll need to do all the maths so that it outputs the mass fraction. 

abenhadj posted this 14 October 2019

As I mentioned you can rely on Fluent Expressions instead of UDF if u feel more comfortable with the syntax.

Best regards,

Amine

khalidb77 posted this 14 October 2019

Sorry if I did not clarify my question properly. What I want to say: I have (air+Co2) mixture and I want to define the value of concentration of Co2 instead of the mass fraction on the boundaries and I want to set it as a constant value (as 350 ppm)? I just want Fluent to consider different concentrations between the walls? knowing that concentration is a dimensional quantity not the same as the mass fraction which it non-dimensional? so is that possible?

Many thanks

Khalid

abenhadj posted this 15 October 2019

Yes again via UDF profile or Fluent Expression profile. The function which I introduced earlier needs to be written to translate from concentration to mass fraction

Best regards,

Amine

  • Liked by
  • khalidb77
khalidb77 posted this 15 October 2019

Can I write a UDF and you corrected it to me?

 

abenhadj posted this 15 October 2019

You can write it here and we can comment. Just to remind here, that is not part of our (ANSYS Staff) contribution on this academic open platform to debug UDF's.

Best regards,

Amine

khalidb77 posted this 15 October 2019

OK in order to start I cannot find the suitable macro for defining the concentration? may you tell me? 

Khalid

 

 

 

rwoolhou posted this 15 October 2019

Have a look in the UDF manual, there's a list of most of the main macros you'll need. If you're adding a constant (uniform) amount of an inert gas why don't you just adjust the material properties of the main species? What do you expect to happen when you add 350ppm of CO2 to air? 

khalidb77 posted this 15 October 2019

Many thanks rwoolhou for the answer. The concentration does not exist at the properties of the species? In addition, I have a closed square cavity and I want to set the concentration as 350 & 300 ppm on the vertical walls.

 

 

abenhadj posted this 15 October 2019

1/Your require DEFINE_PROFILE

2/The conversion is :molar weight of component x concentration/mixture density

3/ 1 ppm = 10e-6

Best regards,

Amine

khalidb77 posted this 15 October 2019

Excuse me 1 ppm = 1e-6 of what?

abenhadj posted this 16 October 2019

It depend on whether it is Mass, volume or mole based l. That is your input which you should now. If it is mass bases than it a mass fraction.

Best regards,

Amine

Close