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

DEFINE_ADJUST & Domain...

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2008, 11:02
Default DEFINE_ADJUST & Domain...
  #1
Corentin
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!
  Reply With Quote

Old   April 4, 2008, 11:36
Default Re: DEFINE_ADJUST & Domain...
  #2
RE13
Guest
 
Posts: n/a
The domain pointer is automatically passed to the DEFINE_ADJUST macro from the solver
  Reply With Quote

Old   April 7, 2008, 04:35
Default Re: DEFINE_ADJUST & Domain...
  #3
Corentin
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...

  Reply With Quote

Old   April 7, 2008, 10:57
Default Re: DEFINE_ADJUST & Domain...
  #4
RE13
Guest
 
Posts: n/a
paste your DEFINE_ADJUST code here so we can see if there are any mistakes
  Reply With Quote

Old   April 8, 2008, 03:57
Default Re: DEFINE_ADJUST & Domain...
  #5
Corentin
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?
  Reply With Quote

Old   April 8, 2008, 18:50
Default Re: DEFINE_ADJUST & Domain...
  #6
RE13
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
  Reply With Quote

Old   April 9, 2008, 03:28
Default Re: DEFINE_ADJUST & Domain...
  #7
Corentin
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.
  Reply With Quote

Old   April 9, 2008, 03:58
Default Re: DEFINE_ADJUST & Domain...
  #8
max
Guest
 
Posts: n/a
Are you sure that you have hooked your Adjust-Function:

Define/User-Defined/Function-Hooks?

Max
  Reply With Quote

Old   April 9, 2008, 11:37
Default Re: DEFINE_ADJUST & Domain...
  #9
RE13
Guest
 
Posts: n/a
I was thinking the same thing...
  Reply With Quote

Old   April 9, 2008, 12:30
Default Re: DEFINE_ADJUST & Domain...
  #10
Corentin
Guest
 
Posts: n/a
Yes, I hooked it. I had forgotten, but now it is done, and still not working
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


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


All times are GMT -4. The time now is 10:49.