|
[Sponsors] |
Need help on undocumented Fluent Intrinsic Functio |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 18, 2001, 11:55 |
Need help on undocumented Fluent Intrinsic Functio
|
#1 |
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> ... } |
|
January 18, 2001, 18:19 |
Re: Need help on undocumented Fluent Intrinsic Fun
|
#2 |
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 |
|
January 18, 2001, 22:21 |
Re: Need help on undocumented Fluent Intrinsic Fun
|
#3 |
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??? |
|
January 18, 2001, 22:27 |
Re: Need help on undocumented Fluent Intrinsic Fun
|
#4 |
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 |
|
January 19, 2001, 03:05 |
Re: Need help on undocumented Fluent Intrinsic Fun
|
#5 |
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; ..... } |
|
January 19, 2001, 03:20 |
Re: Need help on undocumented Fluent Intrinsic Fun
|
#6 |
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 |
|
January 19, 2001, 12:49 |
Re: Need help on undocumented Fluent Intrinsic Fun
|
#7 |
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. |
|
January 19, 2001, 23:20 |
Re: Need help on undocumented Fluent Intrinsic Fun
|
#8 |
Guest
Posts: n/a
|
About 18 months
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Stopping a Fluent batch job AND saving the data! Possible? | Volker Pawlik | FLUENT | 13 | December 28, 2020 04:16 |
Integration of a Custom C++ Model into FLUENT | Syed Haider | FLUENT | 2 | March 6, 2018 23:37 |
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 |