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

What are the differences between F_AREA and F_AREA_CACHE ?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2017, 11:34
Default What are the differences between F_AREA and F_AREA_CACHE ?
  #1
Senior Member
 
Join Date: Jun 2014
Location: Taiwan
Posts: 100
Rep Power: 11
SJSW is on a distinguished road
Hi~

I found F_AREA in ANSYS Help.
It's F_AREA(A,f,t) with A[ND_ND], face_t f, and Thread *t.
A is a vector.

However, I didn't find F_AREA_CACHE in ANSYS Help.
I found it on the internet, but I don't know the differences between F_AREA and F_AREA_CACHE.

The example use for F_AREA is as follows:
real A[ND_ND], area;
real area;
F_AREA(A, f, t);
area = NV_MAG(A);

The example use for F_AREA_CACHE is as follows:
area = NV_MAG (F_AREA_CACHE (f, t));

It seems that they are the same?
What are the differences?
Thank you!
SJSW is offline   Reply With Quote

Old   March 24, 2017, 05:53
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
In Fluent 17.1, metric.h contains the following line:

Code:
#define F_AREA(A,f,t)NV_V(A, =, F_AREA_CACHE(f,t))
This means that every time that your write
Code:
F_AREA(A,f,t);
area=NV_MAG(A);
this is fully identical to
Code:
NV_V(A, =, F_AREA_CACHE(f,t));
area=NV_MAG(A);
which is functionally identical to (assuming you don't use A later on)
Code:
area=NV_MAG(F_AREA_CACHE(f,t));
But the Fluent manual only talks about F_AREA. So it is best to use F_AREA, as it is possible that in later version they change the code in the background, and then F_AREA_CACHE might no longer work (or even worse: it works but gives a different result).
SJSW likes this.
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



All times are GMT -4. The time now is 04:05.