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

Species Disappearing

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By nvarma
  • 1 Post By nvarma
  • 1 Post By nvarma

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 26, 2016, 16:37
Default Species Disappearing
  #1
Member
 
Join Date: Jun 2016
Posts: 64
Rep Power: 10
Baden is on a distinguished road
Hello all.

I am a college student attempting to simulate the flow of acid through a 3D porous rock sample. However, for the sake of simplicity, I will only be modeling species transport through a pipe in this thread.

Below I've included the geometry/mesh used in Fluent.



My Fluent setup is as follows:
  • General
    • Type: Pressure-Based
    • Time: Transient
    • Velocity Formulation: Absolute
  • Models
    • Viscous: Laminar
    • Species: Species Transport (no reactions)
  • Materials
    • Mixture: hydrogen chloride and water-liquid
      • Density method: volume-weighted-mixing-law
    • Solid: calcium-carbonate
  • Boundary Conditions
    • Inlet Velocity: 1.65e-05 m/s
    • Inlet HCl Mass Fraction: 0.02
  • Solution Initialization
    • Standard Initialization computed from Inlet
I want the pipe to initially be filled with only water, so I patch the value of HCl in the interior zone to be 0 after initializing. When I try to run the simulation after patching, the solver converges at each time step (although there is reversed flow) but the contours of HCl mass fraction look like this regardless of time step size or number of time steps:



It appears as though the HCl is simply disappearing immediately after entering the pipe. I have scoured the internet for threads with similar problems and have come up empty-handed. Does anyone know why I might be encountering this problem and how to fix it?
Baden is offline   Reply With Quote

Old   July 26, 2016, 17:48
Default
  #2
Senior Member
 
nm
Join Date: Mar 2013
Posts: 100
Rep Power: 13
nvarma is on a distinguished road
What is your outlet boundary condition?

Also, did you try running it

1. with "pressure inlet" to see if the same problem persists?
2. Patching 0.5 for species mass fraction to see if the solution reaches the same steady state?


My first guess is that the velocity is too small to affect any change.

If you are looking for the effects of bouyancy, make sure that
1. gravity is on
2. compressible/bossinesq model is used appropriately.
nvarma is offline   Reply With Quote

Old   July 26, 2016, 18:37
Default
  #3
Member
 
Join Date: Jun 2016
Posts: 64
Rep Power: 10
Baden is on a distinguished road
Quote:
Originally Posted by nvarma View Post
What is your outlet boundary condition?

Also, did you try running it

1. with "pressure inlet" to see if the same problem persists?
2. Patching 0.5 for species mass fraction to see if the solution reaches the same steady state?


My first guess is that the velocity is too small to affect any change.

If you are looking for the effects of bouyancy, make sure that
1. gravity is on
2. compressible/bossinesq model is used appropriately.
Thank you very much for your response.

It appears that you are correct guessing that the velocity is too small, which now seems obvious. By increasing the velocity by a magnitude of 1000, I was able to get these contours after only 3 seconds:



However, the purpose of my project is to match experimental data so I have to use a velocity of 1.65e-5 m/s. Is there any changes I could make to the simulation/model so that this velocity would be viable? Would using a finer mesh or adaptive time step (for longer simulated flow time) work?
Baden is offline   Reply With Quote

Old   July 26, 2016, 18:40
Default
  #4
Senior Member
 
nm
Join Date: Mar 2013
Posts: 100
Rep Power: 13
nvarma is on a distinguished road
Is gravity enabled? Is the species 2 (HCl) modeled as ideal gas or is bossinesq model turned on?

If the velocity in experiments are that low, then gravity will have a significant impact and has to be modeled assuming I am not misunderstanding your problem.
nvarma is offline   Reply With Quote

Old   July 26, 2016, 18:51
Default
  #5
Member
 
Join Date: Jun 2016
Posts: 64
Rep Power: 10
Baden is on a distinguished road
Quote:
Originally Posted by nvarma View Post
Is gravity enabled? Is the species 2 (HCl) modeled as ideal gas or is bossinesq model turned on?

If the velocity in experiments are that low, then gravity will have a significant impact and has to be modeled assuming I am not misunderstanding your problem.
Gravity is not enabled as it is considered negligible in the experiments. As for the bossinesq model, I am not sure how it relates to what I am doing. Both components of the mixture used in species transport, HCl and H2O, are liquids and have properties that are independent of temperature.
Baden is offline   Reply With Quote

Old   July 26, 2016, 18:59
Default
  #6
Senior Member
 
nm
Join Date: Mar 2013
Posts: 100
Rep Power: 13
nvarma is on a distinguished road
Since you said Hydrogen Chloride I assumed it is gas and was suggesting to consider natural convection. My bad.

Again I am speaking form intuition so correct me if I am wrong.

HCl liquid has a density of 1.49 kg/m3
Water has a density of 1 kg/m3

At such low velocities of HCL entering at bottom, (laminar) diffusion would take a long time.

What is your water-HCl diffusion coefficient? Is that obtained from experiments?


Also for the porous zone, are the flow resistance values obtained experimentally?
Baden likes this.
nvarma is offline   Reply With Quote

Old   July 27, 2016, 11:40
Default
  #7
Member
 
Join Date: Jun 2016
Posts: 64
Rep Power: 10
Baden is on a distinguished road
Quote:
Originally Posted by nvarma View Post
Since you said Hydrogen Chloride I assumed it is gas and was suggesting to consider natural convection. My bad.

Again I am speaking form intuition so correct me if I am wrong.

HCl liquid has a density of 1.49 kg/m3
Water has a density of 1 kg/m3

At such low velocities of HCL entering at bottom, (laminar) diffusion would take a long time.

What is your water-HCl diffusion coefficient? Is that obtained from experiments?


Also for the porous zone, are the flow resistance values obtained experimentally?
The molecular diffusivity of HCl was determined experimentally to be 3.6e-9 m^2/s. I am applying this number using the "constant dilute approximation" method.

As for the initial values viscous resistances, they too were determined experimentally to be in the range of 0.8 - 2.0 mD. For my model, I am using a value of 1 mD (9.87e-16 m^2) for the initial values of viscous resistance. Note that these values do change over time (implemented via UDF) as the porous rock is dissolved by the acid flowing through it. I did not include this in my problem statement in this thread for the sake of simplicity.
Baden is offline   Reply With Quote

Old   July 27, 2016, 16:55
Default
  #8
Senior Member
 
nm
Join Date: Mar 2013
Posts: 100
Rep Power: 13
nvarma is on a distinguished road
Okay, that makes sense. The only remaining input I would be worried about is porosity. Model seems to be okay to me.

So I think your species is not necessarily disappearing, may be the diffusion is so slow that it takes a lot more iterations to get there. To test this may be you can run with a larger times step with implicit scheme and check if that's the case.

Good luck
nvarma is offline   Reply With Quote

Old   July 28, 2016, 12:10
Default
  #9
Member
 
Join Date: Jun 2016
Posts: 64
Rep Power: 10
Baden is on a distinguished road
Quote:
Originally Posted by nvarma View Post
Okay, that makes sense. The only remaining input I would be worried about is porosity. Model seems to be okay to me.

So I think your species is not necessarily disappearing, may be the diffusion is so slow that it takes a lot more iterations to get there. To test this may be you can run with a larger times step with implicit scheme and check if that's the case.

Good luck
Alright, thank you for your help.

When I run the simulation with the unsimplified model (porous zone, acid sink, UDFs, etc), I get the following residuals for 1 time step of 0.1 seconds:



Any time step larger than 0.01 seconds also gives me similar residuals and the simulation doesn't converge. I think that this behavior indicates that I need to use a smaller time step. The following residuals are from a 10 time steps of 0.01 seconds:



These residuals appear to be good until the 150 iteration mark, where they flatten out. Also, the solver converges after just one iteration after that point.

My questions are as follows:
  1. Is there a way I can use a time step larger than 0.01 seconds and still get accurate results?
  2. Why are the residuals flattening out after a few time steps? Does this behavior indicate that there is an error in my model?
Baden is offline   Reply With Quote

Old   July 28, 2016, 12:45
Default
  #10
Senior Member
 
nm
Join Date: Mar 2013
Posts: 100
Rep Power: 13
nvarma is on a distinguished road
>similar residuals and the simulation doesn't converge.

For transient/unsteady problems residuals will oscillate (going down during "iterations per time step", and jumping back up, at the next time step). This doesn't necessarily mean your solutions are inaccurate.

Add some other monitor (outlet velocity for example) and see if they flatten out. If that flattens out it just means that you have reached steady state and your solution is not likely to change if you continue the run.


To answer your question:

>Is there a way I can use a time step larger than 0.01 seconds and still get accurate results?

Keep your time-step below the time scale you want to capture OR below the value necessary to avoid divergence.

Also using double precision and second order methods is better.

>Why are the residuals flattening out after a few time steps? Does this behavior indicate that there is an error in my model?

It likely means that your solution has reached steady state. Add another monitor and ensure this. If that is the case, running it for longer is unlikely to change your solution/.
Baden likes this.
nvarma is offline   Reply With Quote

Old   July 28, 2016, 13:21
Default
  #11
Member
 
Join Date: Jun 2016
Posts: 64
Rep Power: 10
Baden is on a distinguished road
Quote:
Originally Posted by nvarma View Post
>similar residuals and the simulation doesn't converge.

For transient/unsteady problems residuals will oscillate (going down during "iterations per time step", and jumping back up, at the next time step). This doesn't necessarily mean your solutions are inaccurate.
I understand that the residuals should oscillate like they do with a time step of 0.01 seconds, but first image of residuals I posted was from a single time step. I don't think that the residuals should oscillate like that within a single time step. If they do, I think that means the time step is too large (plus, the solver didn't converge). Please correct me if I'm wrong on this.

Quote:
Originally Posted by nvarma View Post
Add some other monitor (outlet velocity for example) and see if they flatten out. If that flattens out it just means that you have reached steady state and your solution is not likely to change if you continue the run.
I added a monitor for the Y-Velocity and it appeared to flatten out like the residuals like so:



Does this necessarily mean I have reached steady-state? The HCl that is being injected into the porous zone should be advancing each time step and displacing an equal amount of water present in the porous zone, so I would think that a flattened outlet velocity monitor is to be expected.

Quote:
Originally Posted by nvarma View Post
To answer your question:

>Is there a way I can use a time step larger than 0.01 seconds and still get accurate results?

Keep your time-step below the time scale you want to capture OR below the value necessary to avoid divergence.

Also using double precision and second order methods is better.

>Why are the residuals flattening out after a few time steps? Does this behavior indicate that there is an error in my model?

It likely means that your solution has reached steady state. Add another monitor and ensure this. If that is the case, running it for longer is unlikely to change your solution/.
You mention that time step has to be kept below the time scale or low enough to prevent divergence. As I mentioned previously, a time step greater than 0.01 seconds causes oscillation within a single time step. Does this mean that any time step larger than 0.01 seconds causes divergence? Or is the oscillation within the time step acceptable?

As an example, here are the residuals from 10 time steps with a step size of 0.1 seconds:



As you can see, there is no jump back up after each time step and the HCl residual constantly oscillates. This fact makes me think I have to use a time step of 0.01 seconds, even though this is extremely small for how long of a simulation I want to run (3 hours). Is there any solution to this or am I misinterpreting what is happening?
Baden is offline   Reply With Quote

Old   July 29, 2016, 10:01
Default
  #12
Senior Member
 
nm
Join Date: Mar 2013
Posts: 100
Rep Power: 13
nvarma is on a distinguished road
It doesn't meet it WILL diverge. But it shows that your solution is not numerically converging (within a time step). ie, it will be inaccurate.

What I would do in such a situation is
1. Change the relaxation factor, time step, and the scheme.
2. Refine the mesh.

I would also try running the exact case in steady state first to see if this is caused by any other issue.

Also a good monitor for your problem would be % mass of HCl at the outlet.
Baden likes this.
nvarma is offline   Reply With Quote

Old   October 21, 2019, 11:54
Default Hi How to write Velocity or pressure Udf in Silencer Help me ?
  #13
New Member
 
Joseph
Join Date: Oct 2019
Posts: 3
Rep Power: 7
yusufgondall1992 is on a distinguished road
nozzle pressure 40Mpa gas flow , need to decrease in real time .
How to write Udf pressure İnlet Profile ?
yusufgondall1992 is offline   Reply With Quote

Reply

Tags
mass fraction, patch, pipe, species transport


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
Species Mole and Mass Fraction Macro combustion FLUENT 18 February 5, 2024 13:23
Modelling Biomass Combustion via Species Transport Racheal FLUENT 39 January 8, 2022 08:42
Site Species Diger FLUENT 6 May 3, 2016 06:36
A question about species box of species transport model tjushang FLUENT 2 June 25, 2014 08:56
Species order fluent Raddi FLUENT 1 March 13, 2009 01:21


All times are GMT -4. The time now is 16:04.