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

Compressible flow solver for density and velocity only

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By as020002

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2020, 09:30
Default Compressible flow solver for density and velocity only
  #1
New Member
 
Ali Shakeri
Join Date: Mar 2020
Posts: 3
Rep Power: 6
alishakeri is on a distinguished road
Hi everybody,


I am modelling an isothermal compressible flow. I have constitutive relation for viscosity and equation of state for pressure and temperature is always constant.



I am reading the OpenFOAM user guide to find a suitable solver for my problem. I think I should choose one of these solvers:
  • rhoCentralFoam
  • rhoPimpleFoam
  • rhoSimpleFoam

The problem with all above solvers is that temperature is a mandatory field in all of them. However, I have no equation for temperature.


Do I have other options in OpenFOAM to solve a compressible flow with only mass and momentum equations?
alishakeri is offline   Reply With Quote

Old   April 1, 2020, 05:12
Default
  #2
New Member
 
CHEUNG WING KI
Join Date: May 2017
Posts: 16
Rep Power: 9
as020002 is on a distinguished road
Compressible flow solver does not solve the temperature directly, instead it solves the energy equation(h or e) then compute the temperature after that.

So temperature B.C. is mandatory in compressible flow while it's not in incompressible flow(only p, U)

In addition, only solving mass and momentum conservation equations in compressible flow would not be conserved.
as020002 is offline   Reply With Quote

Old   April 1, 2020, 05:45
Default
  #3
New Member
 
Ali Shakeri
Join Date: Mar 2020
Posts: 3
Rep Power: 6
alishakeri is on a distinguished road
Quote:
Originally Posted by as020002 View Post
Compressible flow solver does not solve the temperature directly, instead it solves the energy equation(h or e) then compute the temperature after that.

So temperature B.C. is mandatory in compressible flow while it's not in incompressible flow(only p, U)

In addition, only solving mass and momentum conservation equations in compressible flow would not be conserved.



Imagine that temperature is always constant. So, the only variables are density and velocity fields. Therefore, we can write conservation of mass and momentum and we can solve this system by constitutive relations for viscosity and pressure.


In my case even the constitutive relations are independent of temperature, so temperature and energy are totally irrelevant for my problem. Therefore, I am looking for a simple isothermal compressible solver. Is there such a solver in OpenFOAM?


What I can imagine is that I can use the rhoCentralFoam and put the right hand side of the energy equation to zero (ignore it). However, this means that I will waste some computational power for a variable which I do not have it in my problem.
alishakeri is offline   Reply With Quote

Old   April 1, 2020, 07:03
Default
  #4
New Member
 
CHEUNG WING KI
Join Date: May 2017
Posts: 16
Rep Power: 9
as020002 is on a distinguished road
What I am confused is that even though the temperature is at constant does not mean the energy the same. Because the temperature is not just a simple scalar (like solving scalar transport equation), but a scalar determined by internal energy or enthalpy.

As far as I've learnt in fluid dynamics, the energy equation's always activated when the flow has compressibility.

If you still intend to do it, you may try rhoPimpleFoam.
TommyM likes this.
as020002 is offline   Reply With Quote

Old   April 1, 2020, 07:34
Default
  #5
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
Quote:
Originally Posted by alishakeri View Post
Imagine that temperature is always constant. So, the only variables are density and velocity fields. Therefore, we can write conservation of mass and momentum and we can solve this system by constitutive relations for viscosity and pressure.


In my case even the constitutive relations are independent of temperature, so temperature and energy are totally irrelevant for my problem. Therefore, I am looking for a simple isothermal compressible solver. Is there such a solver in OpenFOAM?


What I can imagine is that I can use the rhoCentralFoam and put the right hand side of the energy equation to zero (ignore it). However, this means that I will waste some computational power for a variable which I do not have it in my problem.
You should rephrase your query there buddy, what you need is a DENSITY BASED SOLVER which, of course, falls in the category of a compressible solver. The difference is that instead of solving a PDE for enthalpy, you solve a transport-diffusion (no reaction, asumming you're working on the incompressible range) equation for density. I assume you want to study non-boussinesq gravity currents in... water? So, no shocks, or Ma > 0.2, right?

To answer your question, no, there isnt such a solver implemented in FOAM. You'll have to write it. Fortunately for you, you just have to base it on rhoPimpleFoam for the flow solver, delete whatever is related to temperature/enthalpy and just add the PDE for density. Such programming effort shouldn't take you long, if you know how to 'fiddle' with FOAM.
Santiago is offline   Reply With Quote

Old   April 1, 2020, 08:42
Default
  #6
New Member
 
Ali Shakeri
Join Date: Mar 2020
Posts: 3
Rep Power: 6
alishakeri is on a distinguished road
Quote:
Originally Posted by Santiago View Post
You should rephrase your query there buddy, what you need is a DENSITY BASED SOLVER which, of course, falls in the category of a compressible solver. The difference is that instead of solving a PDE for enthalpy, you solve a transport-diffusion (no reaction, asumming you're working on the incompressible range) equation for density. I assume you want to study non-boussinesq gravity currents in... water? So, no shocks, or Ma > 0.2, right?

To answer your question, no, there isnt such a solver implemented in FOAM. You'll have to write it. Fortunately for you, you just have to base it on rhoPimpleFoam for the flow solver, delete whatever is related to temperature/enthalpy and just add the PDE for density. Such programming effort shouldn't take you long, if you know how to 'fiddle' with FOAM.

Thanks for the response. To elaborate, my problems is solving the hydrodynamic equations for a granular flow. Such flow is compressible but the temperature and energy does not play a role. In my problem, pressure and viscosity are functions of density only.


I will follow your suggestion.
alishakeri is offline   Reply With Quote

Old   January 3, 2022, 09:54
Default
  #7
New Member
 
Pengcheng Zhang
Join Date: Aug 2021
Posts: 14
Rep Power: 5
Zane is on a distinguished road
Hi Ali,

I have the same problem as you. Have you solved the problem yet?

I've been trying to simulate the water hammer effect in hydraulic turbine with rhoPimpleFoam(or pimpleFoam?). In my case, the compressibiliy of water needs to be considered and energy equation is superfluous.

I would appreciate it if you could give me some advice on how to modify rhoPimpleFoam or any other solutions. Thank you!

Last edited by Zane; January 4, 2022 at 04:48.
Zane is offline   Reply With Quote

Reply

Tags
compressible flow, density based


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
Zigzag velocity and pressure with compressible solver Gerry Kan OpenFOAM Running, Solving & CFD 3 March 7, 2020 13:36
Will the results of steady state solver and transient solver be same? carye OpenFOAM Running, Solving & CFD 9 December 28, 2019 06:21
Problem with time average tangential velocity in swirl flow. lakhi FLUENT 5 July 18, 2012 17:28
Problem Interface Solid Fluid with wall velocity Solver v12 hills1 CFX 2 October 12, 2009 06:36
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


All times are GMT -4. The time now is 14:45.