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

Problem with rhoCentralFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 22, 2015, 09:04
Default Problem with rhoCentralFoam
  #1
New Member
 
towanda
Join Date: Aug 2014
Posts: 20
Rep Power: 11
towanda is on a distinguished road
Dear community,
I am a beginer using the solver rhoCentralFoam. I am facing a problem and I run out of ideas. I will be glad if someone could give a hand. Here is the problem:

I am using OF2.4.0 on Debian Jessie. I am simulating the flow through a laval nozzle using rhoCentralFoam. The fluid is air. The flow pass from subsonic regime to supersonic regime and agrees with theoretical prediction from the book. Without any problem the simulation reaches the steady state. In the stationary regime, the fields rho,T,p,U calculated agree with the results obtained with other tool (fluent).

The problem is that the mass conservation is not acomplished between the inlet and the outlet. On the outlet I have more mass flow than in the inlet. I think that this could be due to numerical diffusion. I attach the schemes that I am using to solve the problem(fvSchemes).

In particular I was trying to modify how the convective term is solved but the only scheme that I am able to use is:

div(tauMC) Gauss linear;

¿Does someone has a similar problem with the mass conservation? ¿How can I use high order schemes to solve the convective term? Any suggestion to face the problem will be apreciated.

Thank you in advance
Attached Files
File Type: txt fvSchemes.txt (1.6 KB, 28 views)
towanda is offline   Reply With Quote

Old   February 11, 2016, 10:24
Default
  #2
New Member
 
Join Date: Jan 2016
Posts: 5
Rep Power: 10
julien91 is on a distinguished road
Hi Towanda,
Did you manage to understand your problem? I am working with the same problem using rhoCentralFoam, and I get a non constant mass flow rate inside the nozzle.
Thanks for your help
julien91 is offline   Reply With Quote

Old   February 11, 2016, 11:12
Default
  #3
New Member
 
towanda
Join Date: Aug 2014
Posts: 20
Rep Power: 11
towanda is on a distinguished road
Hello julien91,
I managed to make a little step towards a better understanding of the problem. I have used the run-time function flowRatePatch of OF and I could calculate the mass flow on the inlet patch and on the outlet patch. To use it you should:

1)Add in your controlDict

functions
{
#include "flowRatePatch"
}

2)In the /system/ folder include the file flowRatePatch with the following:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object flowRatePatch;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// This packaged function object sums the flux phi on patch faces so the
// calculated volume flow rate for solvers where phi = volumetric flux, and
// mass flow rate for solvers where phi = mass flux.

flowRatePatch
{
patch <name_patch>;

#includeEtc "caseDicts/postProcessing/flowRate/flowRatePatch.cfg"
}

//***********************************************


By using this run-time function , during the running a /postProcessing/ folder will be created and it will contain a file with the mass flux as function of time.
It works well for my transient simulation using rhoCentralFoam solver. During the transient solution may exist compression or expansion of the fluid so the mass flow at the inlet is not equal than the mass flow at the outlet. But when the steady state is reached, the inlet mass flow equals the outlet mass flow (almost equal , it may exist some numerical diffusion) .

I hope this will help
towanda is offline   Reply With Quote

Old   February 12, 2016, 08:40
Default
  #4
New Member
 
Join Date: Jan 2016
Posts: 5
Rep Power: 10
julien91 is on a distinguished road
Thanks a lot for your help Towanda, I will try it and I will keep you posted
julien91 is offline   Reply With Quote

Old   October 10, 2017, 10:39
Default
  #5
Member
 
Lenzo
Join Date: Feb 2014
Posts: 33
Rep Power: 12
lenzo is on a distinguished road
Hello there!

Any of you have the clue on how to set the write interval on this post-process?

Because This flowratepatch creates a huge file, and I don't need that many data.

Thank you!
lenzo is offline   Reply With Quote

Old   October 18, 2017, 07:13
Default
  #6
Member
 
Lenzo
Join Date: Feb 2014
Posts: 33
Rep Power: 12
lenzo is on a distinguished road
Quote:
Originally Posted by lenzo View Post
Hello there!

Any of you have the clue on how to set the write interval on this post-process?

Because This flowratepatch creates a huge file, and I don't need that many data.

Thank you!
Any one?? help
lenzo is offline   Reply With Quote

Old   October 28, 2017, 02:53
Default
  #7
New Member
 
towanda
Join Date: Aug 2014
Posts: 20
Rep Power: 11
towanda is on a distinguished road
Hello Lenzo,
I am sorry the delay in the reply. I do not know if there is a setting for output times in the postProcess flowRatePatch. In a quick search using gdb I could not find it but I think that debugging the code will allow you to see where the postProcess is solved and perhaps you can find a setting or add one. I am sorry I can not be helpful.

Best Regards
towanda is offline   Reply With Quote

Old   November 21, 2017, 09:28
Default
  #8
Member
 
Lenzo
Join Date: Feb 2014
Posts: 33
Rep Power: 12
lenzo is on a distinguished road
Dear Towanda,

Lately I found how to reduce the data captured by suing flowRatePatch:

In the controlDict, where it is added the flowRateInlet, you can also add function objects. See the example:



flowRateInlet
{
#include "flowRatePatchInlet";

//other function objects here
//p.e.

writeControl adjustableRunTime;
writeInterval 5e-04;

}
lenzo 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 compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 05:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


All times are GMT -4. The time now is 10:28.