|
[Sponsors] |
December 22, 2015, 10:04 |
Problem with rhoCentralFoam
|
#1 |
New Member
towanda
Join Date: Aug 2014
Posts: 20
Rep Power: 12 |
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 |
|
February 11, 2016, 11:24 |
|
#2 |
New Member
Join Date: Jan 2016
Posts: 5
Rep Power: 10 |
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 |
|
February 11, 2016, 12:12 |
|
#3 |
New Member
towanda
Join Date: Aug 2014
Posts: 20
Rep Power: 12 |
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 |
|
February 12, 2016, 09:40 |
|
#4 |
New Member
Join Date: Jan 2016
Posts: 5
Rep Power: 10 |
Thanks a lot for your help Towanda, I will try it and I will keep you posted
|
|
October 10, 2017, 11:39 |
|
#5 |
Member
Lenzo
Join Date: Feb 2014
Posts: 33
Rep Power: 12 |
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! |
|
October 18, 2017, 08:13 |
|
#6 |
Member
Lenzo
Join Date: Feb 2014
Posts: 33
Rep Power: 12 |
||
October 28, 2017, 03:53 |
|
#7 |
New Member
towanda
Join Date: Aug 2014
Posts: 20
Rep Power: 12 |
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 |
|
November 21, 2017, 10:28 |
|
#8 |
Member
Lenzo
Join Date: Feb 2014
Posts: 33
Rep Power: 12 |
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; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 05:43 |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 06:59 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 15:52 |