|
[Sponsors] |
March 13, 2021, 19:59 |
UDF: Derivative in Define Source
|
#1 |
New Member
Poimsm
Join Date: Oct 2017
Posts: 18
Rep Power: 8 |
Hi everyone!
I have some questions about UDFs for FLUENT. 1. The general MACRO for defining a source is DEFINE_SOURCE(name, c, t dS, eqn) and I know that you should provide an equation for the derivative dS for solver stability. If the source term only depends on one variable it is clear how the derivative looks like. For example a source for the x-momentum is a constant multiplied with the velocity in x-dircetion. Thus the derivative is dS[eqn] = constant. But how can you provide the derivative if the source term depends on multiple variables such as source = C1*x-velocity + C2*y-velocity*z-velocity ? Do you have to provide the sum of the partial derivatives like dS[eqn] = C1 + C2*z-velocity + C2*y-velocity? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using PengRobinsonGas EoS with sprayFoam | Jabo | OpenFOAM Running, Solving & CFD | 35 | April 29, 2022 15:35 |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 09:07 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 03:04 |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 11:32 |
[swak4Foam] funkySetFields compilation error | tayo | OpenFOAM Community Contributions | 39 | December 3, 2012 05:18 |