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

How to change the volume porosity during calculation?

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 2 Post By evcelica
  • 1 Post By evcelica
  • 2 Post By Opaque

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2019, 21:24
Default How to change the volume porosity during calculation?
  #1
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
Dear CFX users

Does anyone have the experience to change the volume porosity during the calculation? Imagine we get a moving bed reactor. If we handle this case with porous media, the volume porosity has to be pre-set, which denotes to e0. However, the voidage of the solid may change with the reaction conditions and the internal heat/mass transfer state. And it can be described using a set of empirical formulations that relevant to the inner state, which is represented by e. If we return the modified e to e0 and keep iterating till convergence, thus we can get more realistic results.

This can be done manually by stop the solver and reset the volume porosity according to the last simulation results. But it’s extremely tedious and takes ages to converge. The question is how can I update the volume porosity during the calculation with an interval of certain iterations? (BTW, I tried the User Fortran routine, but every time I update the volume porosity it returns an overflow error. This error was not observed in terms of other parameters, say Velocity and additional variables )

Any advice is appreciated!

Thanks and regards!
longderson is offline   Reply With Quote

Old   February 20, 2019, 05:49
Default
  #2
Senior Member
 
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,173
Rep Power: 23
evcelica is on a distinguished road
Sounds like you are using the "true velocity" porous model? I can see changing the volume porosity would eliminate or create mass, really messing up continuity. This may not be possible since it goes against conservation of mass.
longderson and NewToAnsys like this.
evcelica is offline   Reply With Quote

Old   February 20, 2019, 07:40
Default
  #3
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
hi evcelica

Thanks a lot for your reply. Yes, you are right. "True velocity" is adapted in my model. Your explanation sounds solid. it may go against the mass conservation.

sorry to be a pest, do you have any suggestion to take into account the variation of the solid-void with the current porous model?
longderson is offline   Reply With Quote

Old   February 20, 2019, 08:17
Default
  #4
Senior Member
 
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,173
Rep Power: 23
evcelica is on a distinguished road
Can you just use the superficial model and increase the loss coefficient and decrease permeability so that is equals the same pressure drop characteristics as the "true velocity" model.

I believe it is mathematically equivalent to use:
Permeability Superficial = Permeability True * porosity
Kloss Superficial = Kloss True / (porosity^2)

There may be very slight differences between the two models, which may or may not be applicable to your model. Some posibilities I can think of are:
1.) Transit time for the fluid to flow through the domain would be slower.
2.) Conversion from static to total pressure will be lower using Superficial in high velocity flows, which may not reflect the correct density in compressible fluids.


I'm sure there could be other differences, the documentation may describe more. I'm just saying while the pressure drop equations can be made identical, there may be other small differences between the two models. A simple test model could be run to check how equivalent they are in all aspects.
longderson likes this.
evcelica is offline   Reply With Quote

Old   February 20, 2019, 10:31
Default
  #5
Senior Member
 
Join Date: Jun 2009
Posts: 1,850
Rep Power: 33
Opaque will become famous soon enough
May I ask what kind of variation you are using for volume porosity?

Based on the configuration files for the software, it seems volume porosity can be a function of position (x,y,z) and time.

Have you tried a time-dependent variation? The equations as described in the theory documentation support for variation in time.

However, you must be aware that for an incompressible fluid a variation in volume porosity will trigger a pressure wave at infinity speed since the displaced volume/mass must leave the domain immediately to satisfy the continuity equation. Summary: a proper set of boundary conditions and time stepping is required to be able to solve such a problem.
longderson and NewToAnsys like this.
Opaque is offline   Reply With Quote

Old   February 20, 2019, 20:16
Default
  #6
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
Quote:
Originally Posted by evcelica View Post
Can you just use the superficial model and increase the loss coefficient and decrease permeability so that is equals the same pressure drop characteristics as the "true velocity" model.

I believe it is mathematically equivalent to use:
Permeability Superficial = Permeability True * porosity
Kloss Superficial = Kloss True / (porosity^2)

There may be very slight differences between the two models, which may or may not be applicable to your model. Some posibilities I can think of are:
1.) Transit time for the fluid to flow through the domain would be slower.
2.) Conversion from static to total pressure will be lower using Superficial in high velocity flows, which may not reflect the correct density in compressible fluids.


I'm sure there could be other differences, the documentation may describe more. I'm just saying while the pressure drop equations can be made identical, there may be other small differences between the two models. A simple test model could be run to check how equivalent they are in all aspects.
hi evcelica

Much much appreciated for your advice. I will have a test and shift to the "superficial model"
longderson is offline   Reply With Quote

Old   February 20, 2019, 20:31
Default
  #7
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
Quote:
Originally Posted by Opaque View Post
May I ask what kind of variation you are using for volume porosity?

Based on the configuration files for the software, it seems volume porosity can be a function of position (x,y,z) and time.

Have you tried a time-dependent variation? The equations as described in the theory documentation support for variation in time.

However, you must be aware that for an incompressible fluid a variation in volume porosity will trigger a pressure wave at infinity speed since the displaced volume/mass must leave the domain immediately to satisfy the continuity equation. Summary: a proper set of boundary conditions and time stepping is required to be able to solve such a problem.
Hi Opaque,

Thanks a lot for your attention!

In my case, the volume porosity is a function of position (x,y,z) and internal state (Solid T, Solid composition). Thus I need to modify the volume porosity after I get the aforementioned filed information.

Using a time-dependent variation might be a solution. I will check the documentation to see whether it suits my situation.

Cheers
longderson is offline   Reply With Quote

Old   March 28, 2019, 07:04
Default
  #8
New Member
 
Join Date: Oct 2018
Posts: 17
Rep Power: 7
NewToAnsys is on a distinguished road
Hi @longderson, did you try varying the volume porosity with time? I would be interested to know if it worked out as I am facing a similar problem. Thanks
NewToAnsys is offline   Reply With Quote

Old   March 28, 2019, 07:18
Default
  #9
New Member
 
Join Date: Oct 2018
Posts: 17
Rep Power: 7
NewToAnsys is on a distinguished road
Quote:
Originally Posted by evcelica View Post
Can you just use the superficial model and increase the loss coefficient and decrease permeability so that is equals the same pressure drop characteristics as the "true velocity" model.

I believe it is mathematically equivalent to use:
Permeability Superficial = Permeability True * porosity
Kloss Superficial = Kloss True / (porosity^2)

There may be very slight differences between the two models, which may or may not be applicable to your model. Some posibilities I can think of are:
1.) Transit time for the fluid to flow through the domain would be slower.
2.) Conversion from static to total pressure will be lower using Superficial in high velocity flows, which may not reflect the correct density in compressible fluids.


I'm sure there could be other differences, the documentation may describe more. I'm just saying while the pressure drop equations can be made identical, there may be other small differences between the two models. A simple test model could be run to check how equivalent they are in all aspects.
Hi, I am using "Loss Velocity Type: Superficial" with inputs for porosity and permeability, and getting crazy values for pressure across the porous domain. Any explanation on why this could be happening would be much appreciated. Why would variation of porosity with time not cause the same problem as it did as a function of space in @longderson 's case?
Thanks for your time!
NewToAnsys is offline   Reply With Quote

Old   March 28, 2019, 08:04
Default
  #10
Senior Member
 
Join Date: Jun 2009
Posts: 1,850
Rep Power: 33
Opaque will become famous soon enough
For a single domain, constant properties fluid, you can set up the case as true velocity and superficial velocity and you should obtain an identical solution (barring round off errors).

Of course, the permeability/loss parameters must be set up consistently as Evcelica described. The null test is to set them up with porosity of 1, and check. Then another value and check. You should be able to verify those relationships directly.

Once you have multiple domain with flowing passing through interfaces, the solution may be slightly different depending on the interface is set up.
Opaque is offline   Reply With Quote

Old   March 28, 2019, 08:41
Default
  #11
New Member
 
Join Date: Oct 2018
Posts: 17
Rep Power: 7
NewToAnsys is on a distinguished road
Quote:
Originally Posted by Opaque View Post
Based on the configuration files for the software, it seems volume porosity can be a function of position (x,y,z) and time.

However, you must be aware that for an incompressible fluid a variation in volume porosity will trigger a pressure wave at infinity speed since the displaced volume/mass must leave the domain immediately to satisfy the continuity equation. Summary: a proper set of boundary conditions and time stepping is required to be able to solve such a problem.
@Opaque thank you. Could you explain what time steps could account for the pressure wave at infinity speed? Not asking for a number, simply what it means conceptually in terms of time steps. Considering in this case that porosity is varying with time steps.

Thank you for your time again!
NewToAnsys is offline   Reply With Quote

Old   March 28, 2019, 08:49
Default
  #12
Senior Member
 
Join Date: Jun 2009
Posts: 1,850
Rep Power: 33
Opaque will become famous soon enough
I do not think you want to model a pressure wave at infinite speed, the time step would be prohibitive

There is no such thing as an incompressible fluid, perhaps you need some compressibility in your model if that is the real issue.
Opaque is offline   Reply With Quote

Old   March 31, 2019, 22:12
Default
  #13
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
Quote:
Originally Posted by NewToAnsys View Post
Hi @longderson, did you try varying the volume porosity with time? I would be interested to know if it worked out as I am facing a similar problem. Thanks
At the current stage, I haven't considered the time-varied function. Altering the porosity does cause a big problem for convergence. What I am trying to do is varying it manually with a certain iteration. Maybe you can treat it with the same way that assuming the porosity is constant during the physical time step or several steps, and stop the solver, then modify it and then restart the solver. this sounds stupid but it works.
longderson is offline   Reply With Quote

Reply

Tags
porous media flow, user fortran


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
multiphaseEulerFoam (OF2.3.0) : Courant number explodes when running in parallel Mehrez OpenFOAM Running, Solving & CFD 10 May 18, 2016 11:44
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
water in piston whose volume doesn't change junbbung FLUENT 5 November 8, 2010 11:02
interDyMFoam - change in volume fraction gopala OpenFOAM Running, Solving & CFD 0 April 27, 2009 10:46


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