CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Boundary condtions, variable temperature and derivative

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Opaque
  • 1 Post By Opaque

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 14, 2020, 06:49
Default Boundary condtions, variable temperature and derivative
  #1
Member
 
Abdullah Arslan
Join Date: Apr 2019
Posts: 94
Rep Power: 7
Goenitz is on a distinguished road
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
File Type: png Paper BCs.png (32.6 KB, 16 views)
File Type: png CH4 mass fraction contour.png (25.9 KB, 15 views)

Last edited by Goenitz; February 14, 2020 at 06:59. Reason: explanation
Goenitz is offline   Reply With Quote

Old   February 14, 2020, 08:29
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
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.
Goenitz likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   February 14, 2020, 09:06
Default
  #3
Member
 
Abdullah Arslan
Join Date: Apr 2019
Posts: 94
Rep Power: 7
Goenitz is on a distinguished road
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?
Goenitz is offline   Reply With Quote

Old   February 14, 2020, 15:26
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is online now   Reply With Quote

Old   February 17, 2020, 07:43
Default
  #5
Member
 
Abdullah Arslan
Join Date: Apr 2019
Posts: 94
Rep Power: 7
Goenitz is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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
File Type: png Sources under boundary sources at boundary (wall).png (21.4 KB, 7 views)
File Type: png Subdomain sources.png (22.0 KB, 4 views)
Goenitz is offline   Reply With Quote

Old   February 17, 2020, 08:20
Default Differential
  #6
Member
 
Abdullah Arslan
Join Date: Apr 2019
Posts: 94
Rep Power: 7
Goenitz is on a distinguished road
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.
Goenitz is offline   Reply With Quote

Old   February 17, 2020, 08:48
Default
  #7
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
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.
Opaque is offline   Reply With Quote

Old   February 17, 2020, 09:30
Default
  #8
Member
 
Abdullah Arslan
Join Date: Apr 2019
Posts: 94
Rep Power: 7
Goenitz is on a distinguished road
Quote:
Originally Posted by Opaque View Post
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.
Goenitz is offline   Reply With Quote

Old   February 17, 2020, 10:14
Default
  #9
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
This link seems to be incomplete

Quote:
Originally Posted by Goenitz View Post

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.
Opaque is offline   Reply With Quote

Old   February 17, 2020, 10:23
Default
  #10
Member
 
Abdullah Arslan
Join Date: Apr 2019
Posts: 94
Rep Power: 7
Goenitz is on a distinguished road
Quote:
Originally Posted by Opaque View Post
This link seems to be incomplete
this is working
https://www.jstage.jst.go.jp/article...7_633/_article
Goenitz is offline   Reply With Quote

Old   February 17, 2020, 13:47
Default
  #11
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
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 13:48. Reason: corrections
Opaque is offline   Reply With Quote

Old   February 17, 2020, 16:17
Default
  #12
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is online now   Reply With Quote

Old   February 24, 2020, 06:32
Default
  #13
Member
 
Abdullah Arslan
Join Date: Apr 2019
Posts: 94
Rep Power: 7
Goenitz is on a distinguished road
Quote:
Originally Posted by Opaque View Post
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
Goenitz is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF to Define Temperature Dependent Negative Heat Source ATIKADAR Fluent UDF and Scheme Programming 1 September 23, 2019 03:52
second derivative temperature boundary condition in outlet mostanad Main CFD Forum 7 September 15, 2017 17:20
time derivative of average temperature will_ca OpenFOAM Post-Processing 0 September 10, 2014 11:49
boundary condition for derivative of velocity Daiga CFX 2 December 7, 2009 17:11
temperature derivative lizihujx FLUENT 0 December 18, 2000 22:24


All times are GMT -4. The time now is 06:56.