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

Need help on undocumented Fluent Intrinsic Functio

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 18, 2001, 12:55
Default Need help on undocumented Fluent Intrinsic Functio
  #1
Wilson
Guest
 
Posts: n/a
1) I am currently doing drug delivery to a brain tumor. In my geometry, I have 11 fluid zones (1 tissue zone, 1 tumor zone, 1 cavity zone and 8 wafers zones), whose individual ID ranges from 1 to 11. I wanted to set up my problem such that the drug will have different diffusivity parameter in different zones. Specifically, my code would look something like this: DEFINE_DIFFUSIVITY(set_diffusivity, cell, thread, index) { if <thread is tumor zone> return 1234 if <thread is tissue zone> return 2345 ...... } those instruction in <> is pseudo code. Is there a Macro in Fluent to do this?

(2) Currently under boundary conditions, the viscous resistance of a porous fluid (accessible through DEFINE -> BOUNDARY CONDITIONS -> POROUS -> VISCOUS RESISTANCE) can only be set a constant value. Is there anyway to change this through UDF? Specifically, during run time, I hope to be able to do the following: { ... if <some conditions> Viscous_Resistance = <some values> ... }
  Reply With Quote

Old   January 18, 2001, 19:19
Default Re: Need help on undocumented Fluent Intrinsic Fun
  #2
Greg Perkins
Guest
 
Posts: n/a
(1) try the function

Thread *your_thread; int thread_index_id = xxx;

your_thread = Lookup_Thread(domain,thread_index_id)

where thread_index_id is the thread id number. I think same as gambit zone - but if not you can try some numbers until you determine the right ones.

I've used this for getting a face thread, I imagine it also works for getting a cell thread. I think then you'd test on your_thread vs the thread passed to DEFINE_DIFFUSIVITY to determine what value to return.

(2) Not sure - DEFINE_PROFILE ??????

Regards Greg
  Reply With Quote

Old   January 18, 2001, 23:21
Default Re: Need help on undocumented Fluent Intrinsic Fun
  #3
Wilson
Guest
 
Posts: n/a
Thanks for your prompt reply. However, I have a problem here.

The macro, DEFINE_DIFFUSIVITY, does not pass any domain pointer but rather it passes cell_t and thread pointer to the code. So even if I wanted to use LookUp_Thread, how do I pass the current domain to the function???
  Reply With Quote

Old   January 18, 2001, 23:27
Default Re: Need help on undocumented Fluent Intrinsic Fun
  #4
Greg Perkins
Guest
 
Posts: n/a
yeah no worries just make sure you have the line

extern Domain *domain;

defined - then you'll be able to access everything in the domain without needing to have it passed from Fluent.

Greg
  Reply With Quote

Old   January 19, 2001, 04:05
Default Re: Need help on undocumented Fluent Intrinsic Fun
  #5
Wilson
Guest
 
Posts: n/a
By the way, can I compare two threads??? As you know, when I use DEFINE_DIFFUSIVITY macros, what I am actually doing is the following:

DEFINE_DIFFUSIVITY(set_d, cell, thread, species) { if <at thread id 1> return 12345; if <at thread id 2> return 23456; ..... }

So now what I have is as follows:

DEFINE_DIFFUSIVITY(set_d, cell, thread, species) { extern Domain *domain; Thread *t1 = Lookup_Thread(domain, 1); Thread *t2 = Lookup_Thread(domain, 2); ....

if (thread == t1) return 12345; if (thread == t2) return 23456; ..... }
  Reply With Quote

Old   January 19, 2001, 04:20
Default Re: Need help on undocumented Fluent Intrinsic Fun
  #6
Greg Perkins
Guest
 
Posts: n/a
Yeah - why not?? They are just pointers. I think what you have should work.

However another way is to test the ID of the thread passed. I haven't used this function/macro but there is a macro called

THREAD_ID(t)

which returns the id number of t. Its defined in mem.h.

So you could test on that.

By the way to find out about these things you need to hunt around in Fluent.Inc/Fluent5.x/src folder. If you grep this folder with things you're looking for you can work out some of this stuff. It takes time and then you need to test it - that means try it on some simple cases. You'll find that its not that hard. But can be a bit frsutrating at times.

Greg

  Reply With Quote

Old   January 19, 2001, 13:49
Default Re: Need help on undocumented Fluent Intrinsic Fun
  #7
Wilson
Guest
 
Posts: n/a
Thanks Greg! You are a great help in this forum. I will keep you posted if it is successful.

Btw, for curiousity sake, how long have you been dabbling with Fluent???

Wilson.
  Reply With Quote

Old   January 20, 2001, 00:20
Default Re: Need help on undocumented Fluent Intrinsic Fun
  #8
Greg Perkins
Guest
 
Posts: n/a
About 18 months
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stopping a Fluent batch job AND saving the data! Possible? Volker Pawlik FLUENT 7 May 22, 2014 22:30
Master node in parallel computing only distirubtion syadgar FLUENT 1 September 8, 2009 16:41
On Bug of Fluent 12.0 lzgwhy FLUENT 0 August 26, 2009 06:41
Running fluent in UNIX L3munoz FLUENT 10 August 26, 2009 04:59
Integration of a Custom C++ Model into FLUENT Syed Haider FLUENT 1 February 20, 2006 05:49


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