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

Wrong Solution for sensibleEnthalpy

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 19, 2022, 09:13
Default Wrong Solution for sensibleEnthalpy
  #1
New Member
 
Join Date: Oct 2022
Posts: 5
Rep Power: 3
Hanno66 is on a distinguished road
Hello,

I'm using OpenFoamv7.
While trying rhoCentralFoam at the shock Tube, I realised that the Solution is different from the analytic Solution. I tracked the misstake to the thermophysicalproperties.
When using sensibleEntahlpy for the energy the Soultion seems to be wrong, while using sensibleInternalEnergy results in the correct Solution.

Now I'm searching for the reason, because I will have to use sensibleEnthalpy for a individual Solver (the reason I'm using OpenFoam v7).

Anyone has an answer to my Problem?
Hanno66 is offline   Reply With Quote

Old   October 19, 2022, 09:49
Default
  #2
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
The difference should likely result from your definition of cv / cp. Aside from that, they should be equal. There are numerical advantages, but the formal definition is identical, so if one has a significantly higher residual that should give it away. If one of them did not converge.


Hence check cv/cp and the residuals.
Bloerb is offline   Reply With Quote

Old   October 20, 2022, 11:49
Default
  #3
New Member
 
Join Date: Oct 2022
Posts: 5
Rep Power: 3
Hanno66 is on a distinguished road
I double checked the values for cp and cv and everything seems to be ok....
Hanno66 is offline   Reply With Quote

Old   October 20, 2022, 13:44
Default
  #4
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
Are they the same or different? You might want to use the same value for both
Bloerb is offline   Reply With Quote

Old   October 21, 2022, 04:57
Default
  #5
New Member
 
Join Date: Oct 2022
Posts: 5
Rep Power: 3
Hanno66 is on a distinguished road
They are different. Why should using the same value for both result in a correct Solution? They are different by definiton?
Hanno66 is offline   Reply With Quote

Old   October 21, 2022, 06:51
Default
  #6
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
That is the question I am asking....make sure you use the correct values here for the medium, pressure etc you are solving for! With incompressible flow you should have cp=cv...if your medium does not behave like an ideal gas you might want to make sure to double check your thermodynamics. They are only different if some of the energy used to heat up the fluid goes towards thermal expansion...this might not be the case numerically and hence the difference.
Bloerb is offline   Reply With Quote

Old   December 3, 2022, 06:31
Default
  #7
New Member
 
Join Date: Oct 2022
Posts: 5
Rep Power: 3
Hanno66 is on a distinguished road
Sorry for the late Reply...
I tried it with cp=cv and I got the right Solution. But I still don't get why.
I use a compressible Solver (rhoCentralFoam) with air, so cv and cp can't be the same. Why is the Solution still correct?
Hanno66 is offline   Reply With Quote

Old   December 5, 2022, 04:32
Default
  #8
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
Full Energy equation formulated with internal energy:
0=\nabla\cdot\left(\left(e+\frac{1}{2}\mathbf{v}\cdot\mathbf{v}\right)\rho\mathbf{v}\right)-\nabla\cdot\left(\frac{\lambda}{c_v}\nabla   e\right)-\rho\mathbf{g}\cdot\mathbf{v}+\nabla\cdot\left(\mathbf{v}p\right)
Full Energy equation formulated with Enthalpy:
0=\nabla\cdot\left(\left(h+\frac{1}{2}\mathbf{v}\cdot\mathbf{v}\right)\rho\mathbf{v}\right)-\nabla\cdot\left(\frac{\lambda}{c_p}\nabla  h\right)-\rho\mathbf{g}\cdot\mathbf{v}


You can transform both formulations into each other. In other words they are identical. If you ignore the different variable names h or e, you can see that the only difference is the pressure work term div(pv). That describes the work needed to change the volume. Let's assume this to be zero. I.e an incompressible fluid. You'd get different solutions if you had a difference between cp and cv in that case. One would need to consider h=cp T and e = cv T and still you wouldn't have the same solution.



So it does not matter if you are using a compressible solver. If there is no compression because your flow is to slow you'll get a wrong solution.
The reason being that your equation of state assumption is not valid.



You assume that there is compression when there is likely none.
Bloerb is offline   Reply With Quote

Old   December 12, 2022, 10:54
Default
  #9
New Member
 
Join Date: Oct 2022
Posts: 5
Rep Power: 3
Hanno66 is on a distinguished road
I'm looking at a shock tube with a 20 bar and a 1 bar side so there should be a compression involved...
Hanno66 is offline   Reply With Quote

Reply

Tags
openfoam7, sensibleenthalpy, thermophysicalproperties


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
Stable but wrong solution in VOF method Ulixes FLUENT 0 May 1, 2017 14:08
Ansys CFD POST constructs a solution history from wrong file. Wingman ANSYS 2 November 28, 2016 17:01
grid dependancy gueynard a. Main CFD Forum 19 June 27, 2014 21:22
Naca 0012 (compressible and inviscid) flow convergence problem bipulsaha FLUENT 1 July 6, 2011 07:51
Wall functions Abhijit Tilak Main CFD Forum 6 February 5, 1999 01:16


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