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

Applying named expressions correctly?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 4, 2021, 16:13
Default Applying named expressions correctly?
  #1
Member
 
Join Date: Jan 2018
Posts: 33
Rep Power: 8
UchihaMadara is on a distinguished road
Hello all,



I wanted to ask about named expressions, as I have been told in the ansys forum that using named expressions would be better if I have to use DEFINE_PROFILE and F_PROFILE macros.


My question is

Lets say I have a circular inlet patch of a tube and I want to calculate reynolds number through this section of inlet. I have the following in my named expression
Code:
Density*VelocityMagnitude*Dia/DynamicViscosity
, where Dia is constant.


And then I use this in a friction factor formula, which goes into pressure calculation formula, that gets applied to this inlet patch.


my question is, is this applied correctly?
or it should be

Code:
Average(Density,['inlet'], weight='Area') * Average(VelocityMagnitude,['inlet'], weight='Area') * Dia  / Average(DynamicViscosity,['inlet'], weight='Area')
???
UchihaMadara is offline   Reply With Quote

Old   June 5, 2021, 04:06
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Both expressions are Reynolds numbers. There are many ways to define a Reynolds number, and only for the simplest geometries there is an "obvious" choice.

In your case, one is a local, the other one is a global. Which one do you need? The one that was used in the friction factor calculation.

Unfortunately, this is not always specified. The best thing you can do is ask the author. Second best thing: choose what is easiest, and write in your report/article/presentation which one you used.

The good thing: it should not matter that much in the results.
__________________
"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

Tags
expressions, fluent expressions, named expressions


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
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
[ANSYS Meshing] Overlapping Named Selection error though every named selection differs from each othe Onurozcan ANSYS Meshing & Geometry 1 December 10, 2015 22:49
Overlapping Named Selection error though every named selection differs from each othe Onurozcan Main CFD Forum 0 December 6, 2015 17:12
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50


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