|
[Sponsors] |
July 14, 2016, 13:40 |
Converting mass flow rate to mass
|
#1 |
Member
Sandra
Join Date: Oct 2014
Posts: 58
Rep Power: 11 |
Dear OFers.
I have a mass flowrate BC but I need the mass in the simulation. So, I have Code:
O2 = O2fr*runTime.deltaTValue; Code:
V=In file included from osofcFoam2.C:91:0: O2c.H:3:19: note: cannot convert ‘O2fr’ (type ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’) to type ‘const Foam::dimensioned<double>&’ O2 = O2fr*runTime.deltaTValue; ^ make: *** [Make/linux64GccDPOpt/osofcFoam2.o] Error 1 Sandra |
|
July 14, 2016, 14:28 |
|
#2 |
Member
Sandra
Join Date: Oct 2014
Posts: 58
Rep Power: 11 |
Fixed; it was a silly error.
Was missing the () at the end. Anyway, I'm now getting this error. I'm using OF2.3.0 on ubuntu 14.04 Code:
--> FOAM FATAL IO ERROR: Unknown patchField type flowRateInletVelocity for patch type patch Valid patchField types are : 66 ( advective calculated codedFixedValue codedMixed cyclic cyclicACMI cyclicAMI cyclicSlip directionMixed empty externalCoupled fan fanPressure fixedFluxPressure fixedGradient fixedInternalValue fixedJump fixedJumpAMI fixedMean fixedPressureCompressibleDensity fixedValue freestream freestreamPressure groovyBC groovyBCDirection groovyBCFixedValue groovyBCJump inletOutlet inletOutletTotalTemperature mapped mappedField mappedFixedInternalValue mappedFixedPushedInternalValue mixed nonuniformTransformCyclic oscillatingFixedValue outletInlet outletMappedUniformInlet partialSlip phaseHydrostaticPressure prghPressure processor processorCyclic rotatingTotalPressure sliced slip symmetry symmetryPlane syringePressure timeVaryingMappedFixedValue totalPressure totalTemperature turbulentInlet turbulentIntensityKineticEnergyInlet uniformDensityHydrostaticPressure uniformFixedGradient uniformFixedValue uniformInletOutlet uniformJump uniformJumpAMI uniformTotalPressure variableHeightFlowRate waveSurfacePressure waveTransmissive wedge zeroGradient ) file: /home/sandra/OpenFOAM/sandra-2.3.0/OCVSOFC2/0/O2fr.boundaryField.cathode_inlet from line 26 to line 28. From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&) in file /home/sandra/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 143. FOAM exiting |
|
July 15, 2016, 05:38 |
|
#3 |
New Member
Join Date: Feb 2014
Posts: 17
Rep Power: 12 |
Hey Sandra,
it looks like you forgot to include the lib in the controlDict that contains your bc... |
|
July 15, 2016, 09:20 |
|
#4 |
Member
Sandra
Join Date: Oct 2014
Posts: 58
Rep Power: 11 |
Hello again,
I assumed that might be the problem but I don't know which library contains that BC. could you please enlighten me. Sandra |
|
July 15, 2016, 10:06 |
|
#5 |
New Member
Join Date: Feb 2014
Posts: 17
Rep Power: 12 |
Hey,
the bottom line of your make-file should look similar to Code:
LIB = $(FOAM_USER_LIBBIN)/libmyIncompressibleRASModels This library has to be included in the controlDict with Code:
libs ( "libmyIncompressibleRASModels.so" ) |
|
July 19, 2016, 12:23 |
|
#6 |
Member
Sandra
Join Date: Oct 2014
Posts: 58
Rep Power: 11 |
Hello again
I added "libmyIncompressibleRASModels.so" to my controlDict and EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude EXE_LIBS = \ -lincompressibleRASModels to my Make/options but I still get the same error. Sandra |
|
July 20, 2016, 13:02 |
|
#7 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
What is in your Make/file?
|
|
July 20, 2016, 13:58 |
|
#8 |
Member
Sandra
Join Date: Oct 2014
Posts: 58
Rep Power: 11 |
Here are my make stuff
Make/files Code:
osofcFoam2.C EXE = $(FOAM_USER_APPBIN)/osofcFoam2 Code:
osofcFoam2.C EXE = $(FOAM_USER_LIBBIN)/osofcFoam2 Code:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude\ -I$(FOAM_USER_LIBBIN)\ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lsampling\ -lfluidThermophysicalModels \ -lspecie \ -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ -lsampling \ -lfvOptions\ -lincompressibleRASModels |
|
July 20, 2016, 15:16 |
|
#9 |
New Member
Join Date: Feb 2014
Posts: 17
Rep Power: 12 |
Hey Sandra,
"libmyIncompressibleRASModels" was only a dummy. Your case should work with: Code:
osofcFoam2.C EXE = $(FOAM_USER_LIBBIN)/osofcFoam2 Code:
libs ( "libosofcFoam2.so" ) |
|
July 20, 2016, 16:00 |
|
#10 |
Member
Sandra
Join Date: Oct 2014
Posts: 58
Rep Power: 11 |
Thanks ChGr
At the end of my controlDict Code:
libs ( "libOpenFOAM.so" "libgroovyBC.so" "libLEMOS-2.3.0.so" "libosofcFoam2.so" "libIncompressibleRASModels.so") Code:
osofcFoam2.C EXE = $(FOAM_USER_LIBBIN)/osofcFoam2 Sandra |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
trying to perform accurate mass flow rate sampling through hot-film probe | UTA_ARC | ANSYS | 0 | December 2, 2015 13:20 |
Calculating mass flow rate at multiphase flows | Kuslo187 | OpenFOAM Post-Processing | 1 | August 21, 2015 18:11 |
mass flow rate in DPM steady tracking | Roule | FLUENT | 4 | June 1, 2015 10:44 |
Mass flow rate | sepidecent | CFX | 0 | August 9, 2011 00:15 |
mass flow rate error | Masood | FLUENT | 0 | May 22, 2005 00:32 |