calc of mass flux
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 |
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; Try it and share your conclusions, it's important to close the question appropriately. Regards. |
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 |
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. |
All times are GMT -4. The time now is 05:45. |