Problem with calcMassFlow
Hi everyone,
I am using calcMassFlow and it was so easy until know. But actually I try to solve a strange problem: I am working with the rho-option. When I use a rho >1 the tool works fine. But when I use a rho < 1 the tool shows volumeflow and not the massflow. Does anybody know this problem and perhaps a solution? Thanks for reading fightigfalcon23 |
One mor information
After some more test I know, that the tool calculates the massflow, but shows [m^3/s] as unit! |
Question changed
Hi everyone,
the problem isn't solved yet. But the question changed: Does calcMassFlow work with the phi-field? I have a compressible case and I want to calculate the massflow. So I want the kg/s. But when I take a look into the c-file, I think, the tool is working with phi, so I don't have to define rho. My knowledge about programming is quite low. Can anybody explain me, how the tool works. For example the createPhi.h? Thanks a lot for reading Kind regards ff23 |
Quote:
Bernhard |
Thank you Bernhard for your answer. I assumed sth. like this! But why the tool uses the unit m^3/s instead of kg/s? And why the unit changes when the density strains 1?
Or short: When the rho-option in the calcMassFlowDict is commented. Do I get the massflow in kg/s no matter what unit is used in the output? Regards ff23 |
Quote:
m^3/s is alright for the incompressible case ((kg/s)/(kg/m^3)). See discussions elsewhere ("Why is the viscosity wrong?" "Because there is no rho in it") In my opinion the unit can not change because of the value. Are you sure that the dimensions of rho were not changed as well Bernhard |
HI There (and special greetings to bernhard, again :D)
i might have discoverd "something"... I figured a while ago that I had a non constant Massflow on an incompressible case on the Inlet, where U and P are assigned fixedValue(with pisoFoam) -> :confused:. I used the calcMassflow tool on the inlet patch. Using sample to get the velocity at z=0 (equal to inlet) I found that U_z was NOT equal to the U_z i assigned fixedValue. Once I patched the InternalField with another Value than the Inlet i figured that "sample" used values from the internalField for the first cell(s) on the inlet boundary. The rest seems to be ok. 0/U: Code:
internal field... Code:
Location(y) Uz So I came up with 2 possible reasons for that: -1 ) BCs are messing with each other (at (0 0 0) I have a corner with inlet(all fixed value) and symmetryPlane crossing) -2 ) Or "sample" and "calcMassflow" are adressing values stored in cells with z != 0 . (which i would bet on right now, since the values of the cell above the inlet-cell and the inlet cell with the strangevalue happen to be quite similar). Since I have some oszillations in the flow, guess nr. 2 might also explain the variation of massflow, calculatet with "calcmassflow" on the inlet-patch, with time . So whats the deal?? regards! |
Quote:
Try patchIntegrate that comes with OF to double check. Bernhard |
Quote:
thanks for your reply! I checked on things and your tool seems to be summing up correctly, as i supposed, of course! I have been arround the issue for a while now, but i still dont get it. Today I found that Phi, written by the solver, changes signs on the Inlet :eek:. The inlet is supposed to have an Vz >0 everywhere. Vx and Vy equal 0. It is a plain surface. The elemtents of the surface all have positive Areas. I hope that I have no negative density ;). I used pisoFoam for the calculation. And if you take a look here, I think OF might do strange things... Flux at Inlet: Code:
inlet Code:
inlet Code:
inlet The only thing I found on that is UG P77, which says: phi = (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, U, phi); Which leaves the only conclusion that the Correct-Function is messing with my BC. I consulted some literature, which says, that non reflecting BC can lead to non constant flux. I used perfectly reflecting BC (fixed U and p) since I have to impose something. The shearlayer (see U-profile) produces some waves, which I can observe....but... :confused: any ideas? regards! |
Quote:
Bernhard |
Quote:
it is most certainly not a problem of calcMassFlow, since i did not use it. The things posted above are from an Time-Folder created by OF "solving" the case. But how can the sign change during that interpolation?? regards! |
Quote:
Bernhard |
All times are GMT -4. The time now is 07:50. |