|
[Sponsors] |
September 10, 2009, 07:01 |
calc of mass flux
|
#1 |
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17 |
dear all!!
I added the in http://www.cfd-online.com/Forums/ope...-values-2.html posted codes into chtMultiRegionFoam to get the net mass flux in the fluid region(s) (see code-sniped below). ************************************************** ****************************** // --- PIMPLE loop for (int oCorr=0; oCorr<nOuterCorr; oCorr++) { forAll(fluidRegions, i) { Info<< "\nSolving for fluid region " << fluidRegions[i].name() << endl; #include "setRegionFluidFields.H" #include "readFluidMultiRegionPIMPLEControls.H" #include "solveFluid.H" wordList globalBoundaryList; globalBoundaryList = buildGlobalBoundaryList(fluidRegions[i]); #include "calculateMassFlux.H" } ........ } ************************************************** ******************************** it compiles but gives me the following warnings: ************************************************** ******************************* fluid/setRegionFluidFields.H: In function ‘int main(int, char**)’: fluid/setRegionFluidFields.H:1: warning: unused variable ‘mesh’ fluid/setRegionFluidFields.H:5: warning: unused variable ‘K’ fluid/setRegionFluidFields.H:6: warning: unused variable ‘U’ fluid/setRegionFluidFields.H:7: warning: unused variable ‘phi’ fluid/setRegionFluidFields.H:8: warning: unused variable ‘g’ fluid/setRegionFluidFields.H:10: warning: unused variable ‘turb’ fluid/setRegionFluidFields.H:11: warning: unused variable ‘DpDt’ fluid/setRegionFluidFields.H:14: warning: unused variable ‘psi’ fluid/setRegionFluidFields.H:15: warning: unused variable ‘h ************************************************** ******************************* but the code is apparently running. should I still care about the warnings, or did I oversee something?? greatly appreciate your comments! aram |
|
October 27, 2009, 15:43 |
|
#2 |
Senior Member
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23 |
Hello Aram... This kind of warning has the aim of remember you that there are some defined variables that you aren't using. For example:
Code:
int a=2; int b=4; int g; printf("2 by 4 is %d: \n",a*b); Try it and share your conclusions, it's important to close the question appropriately. Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D. Research Scientist Research Center for Computational Methods (CIMEC) - CONICET/UNL Tel: 54-342-4511594 Int. 7032 Colectora Ruta Nac. 168 / Paraje El Pozo (3000) Santa Fe - Argentina. http://www.cimec.org.ar |
|
October 28, 2009, 05:43 |
|
#3 |
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17 |
Hi Santiago,
thank you very much for your comments!!! Thats what I assumed, that the variables mesh, K, U etc. are "not used". That again made me to be sceptical as these variables (defined in "setRegionFluidFields.H") are then used in "readFluidMultiRegionPIMPLEControls.H" and "solveFluid.H" to solve U-Equation, h-Equation etc; and indeed when I comment the reportedly "unnused" variables in "setRegionFluidFields.H" I get an error ("not declared in this scope"). BTW, this is also the case when I remove the modifications for the calculation of the mass-flux .... Appreciate your comments, Aram |
|
October 29, 2009, 03:54 |
|
#4 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
Has anyone any experience with calculating the mass flow/volume flow in paraview?
I've used the 'Surface Flow' filter, but the accuracy is really bad. I've come up with a way which seems abit more accurate. You calculate the Normals of the Slice. You dot it with U to calculate flux, i.e flux=U.Normals, and then you use the filter 'integrate variables' It's still a bit sensitive to where I create the slice, but far less than the 'Surface Flow' filter. Anyone know a better approach I would be happy to hear it. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 58 | July 3, 2020 02:13 |
Mass flux - Axisymmetric problems. | JSM | FLUENT | 0 | May 3, 2007 00:56 |
Definition of Mass flux F1 | Gavin | Siemens | 1 | April 17, 2006 18:51 |
How are the mass flux and mass flow rate defined? | Miles | Siemens | 2 | November 7, 2002 09:45 |
total mass flux correction for compressible fluid? | Francesco Di Maio | Main CFD Forum | 0 | August 21, 2000 05:23 |