|
[Sponsors] | |||||
|
|
|
#1 |
|
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 175
Rep Power: 6 ![]() |
dear all!!
I added the in Calculation of integral boundary values 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 |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 376
Rep Power: 11 ![]() |
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. Post-doctoral Fellow Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL T.E.: 54-342-4511594 Ext. 1005 Güemes 3450 - (3000) Santa Fe Santa Fe - Argentina http://www.cimec.org.ar |
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 175
Rep Power: 6 ![]() |
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 |
|
|
|
|
|
|
|
|
#4 |
|
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 681
Rep Power: 17 ![]() |
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 | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wind turbine simulation | Saturn | CFX | 23 | April 16, 2011 07:34 |
| Mass flux - Axisymmetric problems. | JSM | FLUENT | 0 | May 2, 2007 23:56 |
| Definition of Mass flux F1 | Gavin | CD-adapco | 1 | April 17, 2006 17:51 |
| How are the mass flux and mass flow rate defined? | Miles | CD-adapco | 2 | November 7, 2002 08:45 |
| total mass flux correction for compressible fluid? | Francesco Di Maio | Main CFD Forum | 0 | August 21, 2000 04:23 |