|
[Sponsors] |
June 3, 2023, 13:59 |
average multiplicatii, on
|
#1 |
Member
Andy
Join Date: Jul 2017
Posts: 58
Rep Power: 8 |
Hi
during the simulation i want to store the outlet water flow. Therfore i want to make the following entry to the controlDict: outletflux { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); writeControl timeStep; log true; // Output field values as well writeFields false; regionType faceZone; name outlet; operation sum; // Parameter fields ( phi*alpha.water ); } As you see i tried to get the summation of all cells of the product of phi and alpha. Obviouly this kind of product needs the right syntaxt. can sombidy tell me how to write phi*alpha.water correctly here? thanks |
|
June 4, 2023, 09:12 |
|
#2 | |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26 |
Hello,
Quote:
But a simpler way would be to use alpha.water as weightField when summing phi. Code:
surfaceFieldValue_weightField { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeControl timeStep; writeFields false; surfaceFormat none; regionType patch; name outlet; operation sum; weightField alpha.water; fields ( phi ); } Code:
surfaceFieldValue_weightField { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeControl timeStep; writeFields false; surfaceFormat none; regionType patch; name outlet; operation sum; fields ( alphaPhi0.water ); } Cheers, Yann |
||
June 4, 2023, 09:39 |
|
#3 |
Member
Andy
Join Date: Jul 2017
Posts: 58
Rep Power: 8 |
Hi Yann,
thank you very much. Yes, i use interFoam. the functions worked, however the sum of my outlets in terms of water flow is bigger than at my inlet. I think it's because the wightening with alpha is not the best way to calculate the water flux. Would any body have a better idea? thanks |
|
June 4, 2023, 11:56 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26 |
It should correspond to the water flux.
What case are you simulating ? Did you reach steady state in your simulation ? Yann |
|
June 5, 2023, 05:03 |
|
#5 |
Member
Andy
Join Date: Jul 2017
Posts: 58
Rep Power: 8 |
Hi Yann,
now i reached the steady state. Some of the measurements seem to work. The case is a simple Y-channel with one inlet and two outlets. the inlet water flow in 0.75m³/s I run 3 outlet measurement strategees: 1. Code:
flow_outlet11 { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeControl writeTime; writeFields false; surfaceFormat none; regionType patch; name outlet1; operation sum; weightField alpha.water; fields ( phi ); } 2. Code:
flow_outlet12 { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeControl writeTime; writeFields false; surfaceFormat none; regionType patch; name outlet1; operation sum; fields ( alphaPhi0.water ); } paraview load case->calculator("alpha.water"*U)->temperal integrator (over converged times steps) -> interpolate variables Results: 1. strategy: outlet1: 6.7 outlet2: 4.3 No idea what these values mean. 2. strategy: oulet1: 0.48 outlet2: 0.24 Looks good, the sum is not quite 0.75m³/s, but close 3. strategy outlet1: 0.516 outlet2: 0.28 The sum is bigger than 0.75m³/s So strategy 2 is ok, strategy 3 could be improved maybe. Thank you for you feedback Yann. Last edited by Starcatcher; June 5, 2023 at 07:22. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Converging Diverging Nozzle with dbnsTurbFoam | Saleh Abuhanieh | OpenFOAM Running, Solving & CFD | 4 | December 13, 2019 10:26 |
[solids4Foam] How to calculate drag coeff when using solids4Foam | amuzeshi | OpenFOAM CC Toolkits for Fluid-Structure Interaction | 15 | November 7, 2019 12:50 |
Internal Flow Instability with layers | Zephiro88 | OpenFOAM Running, Solving & CFD | 1 | June 20, 2019 04:20 |
How to obtain turbulent kinetic energy data from LES model of Ansys CFX? | rsin | CFX | 19 | December 29, 2018 04:43 |
Near wall treatment in k-omega SST | Arnoldinho | OpenFOAM Running, Solving & CFD | 38 | March 8, 2017 13:48 |