CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF: Derivative in Define Source

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2021, 19:59
Default UDF: Derivative in Define Source
  #1
New Member
 
Poimsm
Join Date: Oct 2017
Posts: 18
Rep Power: 8
Poimsm is on a distinguished road
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?
Poimsm is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 19:37.