|
[Sponsors] |
May 6, 2020, 12:01 |
Is this correct
|
#1 |
Member
zobekenobe
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 72
Rep Power: 17 |
I am trying to find the amount of a user defined scalar passing through a interior edge/wall.
especially the line in bold Code:
DEFINE_ADJUST(func_name, domain) { Thread* s1 = Lookup_Thread(domain, segment1); Thread* t0 = s1->t0; face_t facet; cell_t c0; begin_f_loop(facet, s1) { c0 = F_C0(facet, s1); value1 = fabs(F_FLUX(facet, s1)) * C_UDSI(c0,t0,r); } end_f_loop(facet, s1) |
|
May 6, 2020, 14:16 |
|
#2 |
Member
mCiFlDk
Join Date: Feb 2020
Posts: 56
Rep Power: 6 |
Hi zobekenobe,
Have you thought about doing it in the post-proc? I mean, create an iso-surface and measure the amount of a certain variable passing though it. In the "report" label, "fluxes" in the main fluent command menu. Regards |
|
May 6, 2020, 15:30 |
Flux
|
#3 |
Senior Member
|
The value returned by the UDF will just be a field showing product of mass flow rate and scalar value. That's not the flow rate of scalar. Firstly, you need to sum over the faces. Secondly, the flow rate of the scalar depends upon the scalar's definition. E.g., if the scalar represents temperature, then you also need to multiply the product of mass flow rate and temperature with specific heat. If the scalar represents species mass fraction, then the formulation is correct. But in any case, you need to sum over the face loop. Or as suggested by mCiFlDk, you can use surface integral. Reports > Flux will not give flow rate of scalars but you can define a custom-field-function and then take its surface integral over the boundary. Again, cff depends on the type of scalar.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is my Dynamic mesh setup correct? | cfd seeker | FLUENT | 16 | October 30, 2020 06:16 |
interFoam | Hydraulic Jump | Correct boundary condition p_rgh | pythag0ra5 | OpenFOAM Running, Solving & CFD | 17 | September 5, 2014 04:31 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 06:20 |
Is this understanding of turbulence models correct? | 3kha | Main CFD Forum | 3 | January 31, 2011 21:31 |
Correct lift but wrong pressure drag - possible? | zx | Main CFD Forum | 4 | July 27, 2007 23:38 |