|
[Sponsors] |
April 4, 2008, 11:02 |
DEFINE_ADJUST & Domain...
|
#1 |
Guest
Posts: n/a
|
Hi!
I am doing an instationnary simulation and I have several iterations per time step. There are some variables that I would like to reset at each time step but also at each iteration. I am of course working with a UDF. To reset after a time step, I am using the DEFINE_EXECUTE_AT_END fuction, and it's working well. But I do not succeed to reset my variables at each iteration. To do so, I am trying to use the DEFINE_ADJUST function, but it need some domain, and I don't know what to do. First : why does it need a domain? The function that reset after each time step doesn't need one... Anyway, I don't know which domain I should put in. I am working on someone else code, how could I get the domain, I don't see it? All I know is that the variables that I want to reset are in a Define_Source which is working on a (c,thread). I thought my domain would be 'thread', but... When I put 'thread' or 'domain', I have no errors, but it's not working. Thank you! |
|
April 4, 2008, 11:36 |
Re: DEFINE_ADJUST & Domain...
|
#2 |
Guest
Posts: n/a
|
The domain pointer is automatically passed to the DEFINE_ADJUST macro from the solver
|
|
April 7, 2008, 04:35 |
Re: DEFINE_ADJUST & Domain...
|
#3 |
Guest
Posts: n/a
|
You mean that it should be done automatically?
What should I type, then? DEFINE_ADJUST(name,domain) ? I tried, it didn't work... |
|
April 7, 2008, 10:57 |
Re: DEFINE_ADJUST & Domain...
|
#4 |
Guest
Posts: n/a
|
paste your DEFINE_ADJUST code here so we can see if there are any mistakes
|
|
April 8, 2008, 03:57 |
Re: DEFINE_ADJUST & Domain...
|
#5 |
Guest
Posts: n/a
|
Ok, thanks.
I just type this: DEFINE_ADJUST(name,domain) { x=0; } There is no error at compilation, but the variable x is not reset to zero. What's wrong? |
|
April 8, 2008, 18:50 |
Re: DEFINE_ADJUST & Domain...
|
#6 |
Guest
Posts: n/a
|
how are you checking the value of x? The define source macro is also called every iteration (but after define adjust), if the value of the variable isn't checked before it is reset than that could be the cause
|
|
April 9, 2008, 03:28 |
Re: DEFINE_ADJUST & Domain...
|
#7 |
Guest
Posts: n/a
|
I am sure the DEFINE_ADJUST isn't done because I put some printf command in it, but this printing is never done.
|
|
April 9, 2008, 03:58 |
Re: DEFINE_ADJUST & Domain...
|
#8 |
Guest
Posts: n/a
|
Are you sure that you have hooked your Adjust-Function:
Define/User-Defined/Function-Hooks? Max |
|
April 9, 2008, 11:37 |
Re: DEFINE_ADJUST & Domain...
|
#9 |
Guest
Posts: n/a
|
I was thinking the same thing...
|
|
April 9, 2008, 12:30 |
Re: DEFINE_ADJUST & Domain...
|
#10 |
Guest
Posts: n/a
|
Yes, I hooked it. I had forgotten, but now it is done, and still not working
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DEFINE_ADJUST Problem | Davis Yohanes Arifin | FLUENT | 14 | February 29, 2020 05:37 |
C_UDSI_G() use in DEFINE_ADJUST | Gemini | FLUENT | 1 | July 5, 2013 01:12 |
Could I use DEFINE_ADJUST to set B.C ? | pour | FLUENT | 0 | May 22, 2008 14:07 |
About DEFINE_ADJUST | sagga | FLUENT | 1 | February 3, 2006 10:49 |
DEFINE_ADJUST | Tomm | FLUENT | 0 | December 7, 2005 11:53 |