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

How can I define d/dx term in UDF?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2021, 12:54
Default How can I define d/dx term in UDF?
  #1
Member
 
Join Date: May 2012
Posts: 30
Rep Power: 14
CaptainCombo is on a distinguished road
I would like to add the terms shown in picture below to each components of the momentum equation. Is there a way to define d/dx, d/dy and d/dz by using UDF macros? Also, if I achieve to do that does Fluent discretize and solve these terms just as it does other derivaives in momentum equation?

CaptainCombo is offline   Reply With Quote

Old   June 17, 2021, 14:42
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
You're not showing terms, but an operator... What should this operate on?

(or maybe a better question to avoid follow up questions: can you write your momentum equation?)
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build".
pakk is offline   Reply With Quote

Old   June 17, 2021, 15:10
Default
  #3
Member
 
Join Date: May 2012
Posts: 30
Rep Power: 14
CaptainCombo is on a distinguished road
Quote:
Originally Posted by pakk View Post
You're not showing terms, but an operator... What should this operate on?

(or maybe a better question to avoid follow up questions: can you write your momentum equation?)


Actually I mean Mx d/dx, My d/dy and Mz d/dz as terms. There is nothing after derivatives (d/dx, d/dy, d/dz). Anyway here is the whole equation;


CaptainCombo is offline   Reply With Quote

Old   June 17, 2021, 17:50
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
You say that there is nothing after the derivatives, but your equation shows that there is a vector B after the derivatives...

Is B the magnetic field? Fluent does not calculate the magnetic field (as far as I know), so you need to put in the magnetic field yourself. And taking the gradient of the magnetic field is an extra step that you have to do yourself also...
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build".
pakk 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
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 08:26
use of pointers in specific heat udf mdakbari Fluent UDF and Scheme Programming 0 April 18, 2014 12:37
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 13:24
UDF FOR UNSTEADY TIME STEP mayur FLUENT 3 August 9, 2006 11:19
UDF Scalar Code: HT 1 Greg Perkins FLUENT 8 October 20, 2000 13:40


All times are GMT -4. The time now is 17:39.