|
[Sponsors] |
January 12, 2017, 20:44 |
custom vector weighted average
|
#1 |
Senior Member
Join Date: Nov 2015
Posts: 135
Rep Power: 10 |
I have two questions:
1. I have a flow with 2 species A and B. When I define n=[A] + [B] as the total molar concentration and in analogy with the mass weighted average as custom functions Vx=n*vx Vy=n*vy Vz=n*vz where vx, vy, vz are the calculated velocity fields and I specify as custom vectors under surface integrals these newly defined Vx,Vy,Vz and calculate a value at some crosssection (e.g. inlet) I get the same value for every field variable. In fact it is even negative. How is that possible? 2. When I define a custom field function and define mass-fraction_A=M_A*[A]/(M_A*[A] + M_B*[B]) Why is that not exactly the same as the internal mass fraction selection? It is sort of close but not quite: e.g. 5.83 vs. 5.87 Is it maybe becoz the values are interpolated to the position where I want to evaluate it and if I use different quantities to express the value there is some numerical imprecision? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
y+ and u+ values with low-Re RANS turbulence models: utility + testcase | florian_krause | OpenFOAM | 114 | August 23, 2023 05:37 |
Floating point exception error | Alan | OpenFOAM Running, Solving & CFD | 11 | July 1, 2021 21:51 |
[swak4Foam] what does this swak function of average on average mean? | immortality | OpenFOAM Community Contributions | 5 | April 25, 2019 09:32 |
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 |