|
[Sponsors] |
Calculating gradient for scalar considering flow direction |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 11, 2019, 08:34 |
Calculating gradient for scalar considering flow direction
|
#1 |
Member
Durgesh
Join Date: Oct 2018
Posts: 34
Rep Power: 8 |
Hello!
I am writing a UDF using execute at end macros, in which I have to use convective part of the governing equation in which I want the gradient value for the scalar based on the upwind scheme. Based on the CFD theory, in the upwind scheme, based on flow direction, method of calculating gradient along x and y-direction changes, means for u(velocity)>0 then Backward Difference scheme is used and for u<0, then Forward Difference Scheme is used to calculate the gradient. I went through the manual to understand how fluent calculates the gradient of a scalar. To get the gradient values for scalar in udf from fluent there is cell macros to calculate gradient which is C_UDSI_G(c,t,0)[0], this gives x-component gradient value. I want to know whether above cell gradient macros follow the upwind scheme. Regards |
|
April 11, 2019, 09:01 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
You should look in the Theory Guide part of the manual. Specifically:
Section 21 is about Solver Theory. Section 21.5 is about the density-based solver. Section 21.5.3 is about Convective fluxes in the density-based solver. The situation that you sketch is for a 1D problem. In 3D, everything becomes a bit more subtle, and Fluent does not use the most basic formulation, but a slightly more complex one, see section 21.5.3. |
|
April 11, 2019, 11:12 |
|
#3 |
Member
Durgesh
Join Date: Oct 2018
Posts: 34
Rep Power: 8 |
Thank you for reply. In my problem, fluid is incompressible, so I am using pressure-based solver. I went through the above sections. Also went through a section where it tells about the evolution of gradient and derivatives and currently least squares cell-based is used for evaluating gradient. I want to know whether gradient cell macros values are following upwind scheme, or I need to write condition based on velocity direction for getting gradient values.
Also, when defining scalar variable in scalar definition box, if I select 'none' in flux function and default in unsteady column, does it mean that both convective and diffusive flux will not be solved by fluent, only unsteady and source term get evaluated. Is it true? Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issues on the simulation of high-speed compressible flow within turbomachinery | dowlee | OpenFOAM Running, Solving & CFD | 11 | August 6, 2021 07:40 |
periodic straight tube flow, no mesh independent solution for pressure gradient | thijs1909 | FLUENT | 5 | May 16, 2018 10:04 |
Review: Reversed flow | CRT | FLUENT | 1 | May 7, 2018 06:36 |
Calculation of the flow just in x direction in 3D model | cavida | OpenFOAM | 3 | July 8, 2015 17:26 |
High No Iterations in Secondary Flow Direction | camoesas | OpenFOAM Running, Solving & CFD | 0 | July 9, 2014 05:11 |