|
[Sponsors] |
Difference between specified and calculated mass flow rate |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 13, 2020, 18:52 |
Difference between specified and calculated mass flow rate
|
#1 |
Member
Join Date: Mar 2019
Posts: 81
Rep Power: 7 |
Hi Foamers,
I am facing a problem with icoReactingMultiphaseInterFoam solver. In U boundary condition, I have specified the inlet mass flow rate as: Code:
Inlet { type flowRateInletVelocity; massFlowRate constant 0.00785; value $internalField; } Code:
Expression patchMassFlow on Inlet: sum=-6.15397e-06 Code:
patchMassFlow { type patchExpression; accumulations ( sum ); patches ( Inlet Outlet ); expression "phi"; verbose true; outputControlMode timeStep; outputInterval 1; writeStartTime 2; allowCoupled true; } Regards, MJ |
|
April 13, 2020, 18:58 |
|
#2 |
Member
Join Date: Mar 2019
Posts: 81
Rep Power: 7 |
Seems that it is being divided by the density (according to the inlet VOF). But why is the mass flow being divided by density?!!
|
|
April 14, 2020, 18:24 |
|
#3 | |
Member
Join Date: Mar 2019
Posts: 81
Rep Power: 7 |
Quote:
More info for Gas: Code:
thermoType { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState incompressiblePerfectGas; specie specie; energy sensibleEnthalpy; } Code:
thermoType { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } |
||
April 15, 2020, 10:12 |
|
#4 |
Senior Member
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 220
Rep Power: 19 |
I believe you need to add the following to the 'flowRateInletVelocity' bc in order for it to be interpreted as mass flow rather than volumetric flow...
Code:
rho rho; |
|
April 15, 2020, 10:19 |
|
#5 | |
Member
Join Date: Mar 2019
Posts: 81
Rep Power: 7 |
Quote:
Thanks a lot for your reply. I tried and specified rho as you mentioned but the solver still returns the same value (ignoring rho?). Don't know what is causing this Regards, MJ |
||
April 15, 2020, 10:30 |
|
#6 |
Senior Member
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 220
Rep Power: 19 |
I assume that the 'patchMassFlow' value you have quoted corresponds to the converged solution and not some intermediate step?
What results do you get for the inlet mass flowrate using the postprocessing utility? E.g. Code:
postProcess -func 'flowRatePatch(name=Inlet)' |
|
April 15, 2020, 10:41 |
|
#7 | |
Member
Join Date: Mar 2019
Posts: 81
Rep Power: 7 |
Quote:
Code:
ExecutionTime = 5.3 s ClockTime = 5 s Expression patchMassFlow on Inlet: sum=-5.53761e-05 Expression patchMassFlow on Outlet: sum=5.53761e-05 fieldAverage fieldAverage1 write: Calculating averages Courant Number mean: 0.00156158 max: 1.5566 Interface Courant Number mean: 1.55945e-05 max: 0.991976 Maximum ddtAlpha : 8.60109e-16 Maximum DiffNum : 0 deltaT = 1.63891e-06 Time = 0.00101337 Code:
Time = 0.005 Reading fields: surfaceScalarField: phi Executing functionObjects surfaceFieldValue flowRatePatch(name=Inlet) write: sum(Inlet) of phi = -5.53761e-05 |
||
April 15, 2020, 10:46 |
|
#8 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
||
April 15, 2020, 11:40 |
|
#9 | |
Member
Join Date: Mar 2019
Posts: 81
Rep Power: 7 |
Quote:
Thanks for your reply. I updated the U boundary condition accordingly: Code:
Inlet { type flowRateInletVelocity; massFlowRate 0.00785; extrapolateProfile yes; rho rho; rhoInlet 140.14; value uniform (0 0 0); } |
||
April 15, 2020, 11:45 |
|
#10 |
Senior Member
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 220
Rep Power: 19 |
What is being set for the phase fraction (alpha) fields at the inlet? Is it single phase or some mixture of liquid and gas?
|
|
April 15, 2020, 11:49 |
|
#11 |
Member
Join Date: Mar 2019
Posts: 81
Rep Power: 7 |
||
April 15, 2020, 12:04 |
|
#12 |
Senior Member
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 220
Rep Power: 19 |
It appears that the behavior of the bc does not change from volume flow to mass flow despite the specification of rho and/or rhoInlet. The simplest solution would then be to specify the desired volumetric flow at the inlet. This is easy enough given that you have prescribed alpha.
It remains unclear, however, why the solver does not interaction with the bc in the manner typical of single phase flows. I have used the 'flowRateInletVelocity' bc previously for single phase simulations (simpleFoam and pimpleFoam) and the behavior most certainly changes following specification of rho. |
|
April 15, 2020, 12:20 |
|
#13 | |
Member
Join Date: Mar 2019
Posts: 81
Rep Power: 7 |
Quote:
I have just specified the equivalent volumetricFlowRate the result is almost the same I have also tried the equivalent velocity (fixedValue) for the boundary. Still getting values at the same order of magnitude (i.e. e-5)!!! |
||
April 18, 2020, 08:49 |
|
#14 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
icoReactingMultiphaseInterFoam is an incompressible solver. Incompressible solvers are internally using a pressure divided by density for numerical efficiency. Hence phi might be u*A not rho*u*A. Please check the unit inside the phi file in one of your results directories. If that is the case "sum phi" will return the volumetric flow rate not the mass flowrate.
|
|
April 18, 2020, 09:04 |
|
#15 | |
Senior Member
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 220
Rep Power: 19 |
Quote:
|
||
April 18, 2020, 13:38 |
|
#16 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
i have looked it up. The solver uses two fields, phi, volumetric flux, and rhoPhi mass flux. Hence my assumption is correct that you calculated it wrong with your function object.
the inflow boundary condition does the following to calculate the patch value: Code:
const scalar avgU = -flowRate_->value(t)/gSum(rho*patch().magSf()); operator==(avgU*n);
if a volumetric flow rate is prescribed rho=1 else Code:
patch().lookupPatchField<volScalarField, scalar>(rhoName_); const fvPatchField<scalar>& rhop = You should however note that is prescribes exactly one value for the entire patch, not a profile and it does not adress the phase distribution. |
|
April 18, 2020, 20:46 |
|
#17 | |
Member
Join Date: Mar 2019
Posts: 81
Rep Power: 7 |
Quote:
Thanks a lot for your time and help. The strange thing is that regardless of the assigned value for the mass flow rate the solver returns the same patch mass flow rate value... Bloerb, what "rho file" are you referring to? Last edited by mm66; April 18, 2020 at 22:14. |
||
Tags |
flowrateinletvelocity, mass flow rate, mass flow rate bc, openfoamv1812 |
|
|