# Boundary condtions, variable temperature and derivative

 Register Blogs Members List Search Today's Posts Mark Forums Read February 14, 2020, 07:49 Boundary condtions, variable temperature and derivative
#1
Member

Abdullah Arslan
Join Date: Apr 2019
Posts: 87
Rep Power: 2 Good day all,

i need to apply this boundary condition on wall.

w_(CH4_wall )=((-Rate×Molar mass) Δy/(ρD_i ))+w_(CH4_fluid )

where w is mass fraction [no unit]
Rate is in mol/m2/s
Δy is derivative distance of wall/fluid transition
D_i is diffusivity coefficient

Preciously, I was putting it as just mass flux [-Rate x Molar mass]. How I can put the above boundary condition? Plus it has no units so as Total source or as Flux, How can I convert above equation?

Similarly, how can I use variable temperature in CFX?
T_wall=((-Rate×Enthalpy) Δy/λ)+T_fluid

λ thermal conductivity
I was using Rate X Enthalpy before as heat flux.

Attached are the boundary conditions and geometry which clears what is Δy.
Does the computed mass fraction near wall is of fluid or of wall (attached image)?

Thank you for your previous help and in advance for future ones.

[For attached image
i is specie variable like CH4, H2
v_i is stochiometric coefficient of reactant'/product"
eff is just effective
ΔT= T_wall - T_fluid
Δw= w_wall - w_fluid
Attached Images Paper BCs.png (32.6 KB, 12 views) CH4 mass fraction contour.png (25.9 KB, 13 views)

Last edited by Goenitz; February 14, 2020 at 07:59. Reason: explanation   February 14, 2020, 09:29 #2 Senior Member   Join Date: Jun 2009 Posts: 1,127 Rep Power: 22 It is always best to understand where that equation is coming from instead of using a discretized version for another method into the software. ANSYS CFX is not a finite difference code, and it is not a cell-centered finite volume code either; therefore, those formulas will only be valid on very specific scenarios. From what I can guess, the formula used to say: Mass Fraction Flux = Rate * Molar Mass where Mass Fraction Flux is given by Mass Fraction Flux = rho * D * grad (Mass Fraction) . Normal Trying to replace a flux condition which depends on the solution (normal gradient) as it converges by a Dirichlet condition is a recipe for convergence problems. In addition, ANSYS CFX only supports "zero flux" conditions on walls. For an accurate representation of non-zero flux condition, or Dirichlet condition on walls, you need to not account for the flux on the equation of interest but also the contributions to the mass conservation and energy equation as well. Recall that the sum of all the species equations add up the mass conservation equation; therefore, the sum of all the fluxes around the boundary better conserve mass either way. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.   February 14, 2020, 10:06 #3 Member   Abdullah Arslan Join Date: Apr 2019 Posts: 87 Rep Power: 2 1. Mass is conserved as species generation and consumption is proportional (conserved) 2. I am using catalyst as Wall and adding sources of heat and mass fluxes. Should I take it as Opening? I will try. 3. Adding sources at wall didn't cause convergence problem but accuracy (80% off than original.), using point 5 equations. 4. I will try to find out how to see if energy is conserved. 5.Mass Fraction Flux = Rate * Molar Mass is coming from some other publication. 6. The equations (in OP) I described above are used in paper for ANSYS CFX 15. 7. Paper link https://www.scopus.com/record/displa...a8ba1432b24f33 8. Can I use variable temperature using CCL or Fortran?   February 14, 2020, 16:26 #4 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 16,061 Rep Power: 123    You can set a variable to a value using a source term and a source term coefficient: Source term = -C(v-v(setpoint)) Source term coefficient = -C Where v is the variable you are setting (mass fraction, velocity, temperature etc) v(setpoint) is the value you want it to have and C is a large number relative to the variable values, maybe 1E6. That's how you do it. Note you should not have convergence problems or linearisation problems with this approach as it is properly linearised and taken account of in the residuals and imbalances calculations. Whether it is a good idea is another question. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.   February 17, 2020, 08:43 #5
Member

Abdullah Arslan
Join Date: Apr 2019
Posts: 87
Rep Power: 2 Quote:
 Originally Posted by ghorrocks You can set a variable to a value using a source term and a source term coefficient: Source term = -C(v-v(setpoint)) Source term coefficient = -C Where v is the variable you are setting (mass fraction, velocity, temperature etc) v(setpoint) is the value you want it to have and C is a large number relative to the variable values, maybe 1E6. That's how you do it. Note you should not have convergence problems or linearisation problems with this approach as it is properly linearised and taken account of in the residuals and imbalances calculations. Whether it is a good idea is another question.
My mixture is multicomponent fluid containing CH4, CO, H2O,H2 and N2. As their component model is "Transport Equation" so they are available as 'sources' under 'boundary sources'. However, they can only be added as Flux (Quantity*kg/m2/s) or as Total Source (Quantity*kg/s).

This is also true if I define my own variable and use "Transport equation" or "Diffusive Transport Equation". So basically, I cannot use Temperature unless I multiply it with Flux or Total Source (which I don't know how as wall velocity is zero).

The source coefficient appears, when I use subdomain. However, my reaction is surface reaction. So 'Flux Coefficient' or 'Total source coefficient' is available.

There is another option adding 'Source point', which requires adding sources at certain user points. But my geometry is too big for that.
Attached Images Sources under boundary sources at boundary (wall).png (21.4 KB, 4 views) Subdomain sources.png (22.0 KB, 4 views)   February 17, 2020, 09:20 Differential #6 Member   Abdullah Arslan Join Date: Apr 2019 Posts: 87 Rep Power: 2 For the expression ΔT/Δy= -Rate×Enthalpy/λ some authors used -Rate×Enthalpy as Flux (makes sense as we just taking λ to LHS of equation) and some used T_wall=((-Rate×Enthalpy) Δy/λ)+T_fluid where ΔT=T_wall - T_fluid I guess T_fluid is T in ANSYS CFX-Pre. But how can I determine Δy which I think is distance between boundary cells and boundary? For now I am just taking 300th of channel height.   February 17, 2020, 09:48 #7 Senior Member   Join Date: Jun 2009 Posts: 1,127 Rep Power: 22 Would you mind pointing to the publication you are using? Something is off for the energy equation boundary condition. The boundary condition for heat transfer at a catalytic wall is not trivial, and definitely not just a flux formula. Boundary energy flux = conductive flux + "radiation flux if active" + "energy release if catalytic" Then, you pick the option for your boundary energy flux: flux specified? Temperature specified? Transfer coefficient? and solve for which temperature value the wall should have. If the wall is catalytic, there is no way to know the temperature at the wall ahead of time unless you are modeling some other physics outside that can be represented as an isothermal wall (say phase change for example). __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.   February 17, 2020, 10:30 #8
Member

Abdullah Arslan
Join Date: Apr 2019
Posts: 87
Rep Power: 2 Quote:
 Originally Posted by Opaque Would you mind pointing to the publication you are using?
This is the paper which uses in their own code T_wall function
https://www.sciencedirect.com/scienc...96890418310343

This is the paper who uses ANSYS CFX11 but didn't tell how they put boundary conditions
https://www.scopus.com/record/displa...a8ba1432b24f33

This is the paper which uses more or less same condition and equation and uses fluxes for mass and energy
https://www.sciencedirect.com/scienc...60319918329045

No radiation, NO CONDUCTION in wall but heat transfer occurs between gas and wall. Though no HTC is given, but gas λ.
Also no temperature or flux or HT coefficient is specified. Wall Temperature is given as function of rate, SMR enthalpy and thermal conductivity. rate depends upon partial pressure and temperature of gas.   February 17, 2020, 11:14 #9
Senior Member

Join Date: Jun 2009
Posts: 1,127
Rep Power: 22 This link seems to be incomplete

Quote:
 Originally Posted by Goenitz This is the paper who uses ANSYS CFX11 but didn't tell how they put boundary conditions https://www.scopus.com/record/displa...a8ba1432b24f33
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.   February 17, 2020, 11:23 #10
Member

Abdullah Arslan
Join Date: Apr 2019
Posts: 87
Rep Power: 2 Quote:
 Originally Posted by Opaque This link seems to be incomplete
this is working
https://www.jstage.jst.go.jp/article...7_633/_article   February 17, 2020, 14:47 #11 Senior Member   Join Date: Jun 2009 Posts: 1,127 Rep Power: 22 I had a look at two of the papers, and my advice (as usual) is to write down the mathematical model, and understand the physics being modeled. Catalytic surface reactions require clear bookkeeping of the different terms and equations involved. Here is the initial food for thought 1 - If there is a reaction at the wall, either mass is removed or added to the system and it must be accounted for in the conservation of mass for the mixture. Summary: source/sink term in the continuity equation 2 - Given that there is a source/sink of mass in the system, the momentum of the mass flux must be computed, and the incoming velocity must be provided. Such velocity is called the "Stefan velocity" and it must be computed such that mass is conserved at the wall. Mass Fraction Flux by diffusion + Bulk Mass Flow * Mass Fraction = Mass generation/destruction) of the given species Then, the summation of the mass fluxes for all species must be equal to the net mass flux (source/sink in the continuity equation); therefore, Sum over all Species ( Dk * grad (Yk)) + bulk density * Stefan Velocity * Yk) = Sum over all species (Mass generation/destruction) Stefan Velocity = { Sum over all species (Mass generation/destruction) - Sum over all Species ( Dk * grad (Yk)) } / Bulk Density Summary: the Stefan Velocity is the velocity at the wall for the source/sink in the continuity equation 3 - If there is source/sink of mass and momentum, there is also a companion term for the energy added/removed from the system Heat Flux at the wall = Conductive Heat Flux + Sum over all Species (Sum over all Species ({ Dk * grad (Yk)) + bulk density * Stefan Velocity * Yk) } * Static Enthalpy) Summary: that equation must be satisfied in order to know the thermal state of the wall, i.e. non-linear equation for T_wall. Once solved, that is your wall temperature. NOTE: even for an adiabatic wall (Heat Flux at the wall == 0), the conductive Heat flux must be taken into account. Adiabatic means no energy transfer due to temperature gradients at the wall, nothing about how energy is transferred/exchanged at the wall. I hope the short summary is good enough, but I advice you to get a good textbook about heat transfer for reacting systems and CFD modeling of such systems. You can also search online for "catalytic wall stefan velocity modeling". Now that you have a mathematical model in place, you can see how to realize it in ANSYS CFX or any other software. Goenitz likes this. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. Last edited by Opaque; February 17, 2020 at 14:48. Reason: corrections   February 17, 2020, 17:17 #12
Super Moderator

Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 16,061
Rep Power: 123    Quote:
 My mixture is multicomponent fluid containing CH4, CO, H2O,H2 and N2. As their component model is "Transport Equation" so they are available as 'sources' under 'boundary sources'. However, they can only be added as Flux (Quantity*kg/m2/s) or as Total Source (Quantity*kg/s).
The source term I was talking about is a total source and you set the units of the term C to suit.

And of course, Opaque's comments about the underlying physics you are trying to implement are important as well.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.   February 24, 2020, 07:32 #13
Member

Abdullah Arslan
Join Date: Apr 2019
Posts: 87
Rep Power: 2 Quote:
 Originally Posted by Opaque I had a look at two of the papers, and my advice (as usual) is to write down the mathematical model, and understand the physics being modeled. Catalytic surface reactions require clear bookkeeping of the different terms and equations involved. Here is the initial food for thought 1 - If there is a reaction at the wall, either mass is removed or added to the system and it must be accounted for in the conservation of mass for the mixture. Summary: source/sink term in the continuity equation 2 - Given that there is a source/sink of mass in the system, the momentum of the mass flux must be computed, and the incoming velocity must be provided. Such velocity is called the "Stefan velocity" and it must be computed such that mass is conserved at the wall. Mass Fraction Flux by diffusion + Bulk Mass Flow * Mass Fraction = Mass generation/destruction) of the given species Then, the summation of the mass fluxes for all species must be equal to the net mass flux (source/sink in the continuity equation); therefore, Sum over all Species ( Dk * grad (Yk)) + bulk density * Stefan Velocity * Yk) = Sum over all species (Mass generation/destruction) Stefan Velocity = { Sum over all species (Mass generation/destruction) - Sum over all Species ( Dk * grad (Yk)) } / Bulk Density Summary: the Stefan Velocity is the velocity at the wall for the source/sink in the continuity equation 3 - If there is source/sink of mass and momentum, there is also a companion term for the energy added/removed from the system Heat Flux at the wall = Conductive Heat Flux + Sum over all Species (Sum over all Species ({ Dk * grad (Yk)) + bulk density * Stefan Velocity * Yk) } * Static Enthalpy) Summary: that equation must be satisfied in order to know the thermal state of the wall, i.e. non-linear equation for T_wall. Once solved, that is your wall temperature. NOTE: even for an adiabatic wall (Heat Flux at the wall == 0), the conductive Heat flux must be taken into account. Adiabatic means no energy transfer due to temperature gradients at the wall, nothing about how energy is transferred/exchanged at the wall. I hope the short summary is good enough, but I advice you to get a good textbook about heat transfer for reacting systems and CFD modeling of such systems. You can also search online for "catalytic wall stefan velocity modeling". Now that you have a mathematical model in place, you can see how to realize it in ANSYS CFX or any other software.
Thank you for the detailed reply. I was going through (for past week) it and thought in CFX, may be I have to add sources in continuity equation. However, it acts like an inlet with mass flow rate, velocity and temperature along species in/out fractions. Here I could set both mass fractions and variable temperature as it is (without any gradient or flux terms, so that was success at least).

Anyway, I found out that Stefan velocity vanishes at steady state, and my reaction is steady state reaction from beginning.

Regards  Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules Similar Threads Thread Thread Starter Forum Replies Last Post ATIKADAR Fluent UDF and Scheme Programming 1 September 23, 2019 04:52 mostanad Main CFD Forum 7 September 15, 2017 18:20 will_ca OpenFOAM Post-Processing 0 September 10, 2014 12:49 Daiga CFX 2 December 7, 2009 18:11 lizihujx FLUENT 0 December 18, 2000 23:24

All times are GMT -4. The time now is 10:02.