|
[Sponsors] |
August 17, 2012, 06:41 |
ptot
|
#1 |
New Member
Join Date: Jul 2012
Posts: 3
Rep Power: 14 |
Hello,
i would like to calculate ptot with the help of function objects. after that i would like to use the function patchmassflowaverage on ptot. how can i calculate ptot so that the function massflowaverage knows the variable?? Greetz |
|
August 17, 2012, 10:24 |
|
#2 |
New Member
Join Date: Jul 2012
Posts: 3
Rep Power: 14 |
i've found something similar in an earlier post here.
i added in my conrtoldict: functions ( compute_ptot { type expressionField; outputControl timeStep; outputInterval 1; fieldName ptot; expression "p + 0.5*magSqr(U)"; autowrite false; } massFlow { type patchMassFlowAverage; functionObjectLibs ( "libsimpleFunctionObjects.so"); verbose true; readFields(ptot); fields (U p T ptot ); patches ( Fluid_Inlet Fluid_Outlet ); factor 1.0; } ); but i get an error, that the function type expressionField is unknown. |
|
June 20, 2013, 18:10 |
|
#3 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I hope you could resolve it.probably too late.but maybe help someone in future,
you can use Swak for mass averaging on total p: Code:
n2_totalPressure { type swakExpression; valueType surface; verbose false; surfaceName normal_Plane_p0_2; surface { type plane; basePoint (0.0345 0.002 0); normalVector (1 0 0); interpolate true; } expression "sum((p+.5*rho*magSqr(U))*rho*area())/sum(rho*area())"; accumulations ( average ); outputControlMode outputTime;//outputTime is added in 0.2.4 Swak4Foam version outputInterval 1; } Code:
totalP // user-defined name of function object entry { type pressureTools; libs ("libutilityFunctionObjects.so"); //region defaultRegion; enabled yes; //timeStart 0; //timeEnd 10; outputControl timeStep;//outputTime;// outputInterval 1; // 5000; calcTotal yes; calcCoeff no; pRef 0; } readFields { type readFields; functionObjectLibs ("libfieldFunctionObjects.so"); fields ( "total(p)" ); } Code:
totalPressure_left { $Average_left; operation weightedAverage; weightField rho; fields ( "total(p)" ); } Code:
Average_left { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); enabled on; log no; valueOutput true; surfaceFormat vtk; source patch; sourceName left; operation areaAverage; fields ( p //phi // surface fields not supported for sampledSurface T rho h U ); outputControl timeStep;//outputTime;// outputInterval 1; // 5000; }
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ptot as default field | Gearb0x | OpenFOAM Running, Solving & CFD | 1 | January 26, 2011 22:36 |
Modifying rhoSimpleFoam to calculate ptot every iteration | RalphS | OpenFOAM | 4 | October 13, 2010 06:00 |
How to sample ptot at runtime | pad | OpenFOAM Post-Processing | 0 | August 26, 2010 08:45 |
[OpenFOAM] Difference between ptot and volPointInterpolateptot | debris | ParaView | 0 | May 24, 2006 12:27 |
Difference between Pabs & Ptot | David | CFX | 5 | December 3, 2002 22:42 |