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

UDF switch macro vs. call Law

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 15, 2002, 11:23
Default UDF switch macro vs. call Law
  #1
Christian
Guest
 
Posts: n/a
Hi

Can anyone tell me when to use the DEFINE_DPM_SWITCH macro end when to call the Laws in my UDF.

Is it of no matter, or are these two methods really doing two different things?

Christian
  Reply With Quote

Old   November 15, 2002, 16:33
Default Re: UDF switch macro vs. call Law
  #2
Allan
Guest
 
Posts: n/a
I had the same question when using the customized laws. However, since it was simple, I wrote my own DEFINE_DPM_SWITCH macro and it worked so I never tried without it. Actually, since Fluent defines the fraction of the evaporating component on a volume rather than a mass basis I preferred my own method. And, it avoided some of my confusion dealing with separate laws for evaporation and boiling - one is all I needed.
  Reply With Quote

Old   November 21, 2002, 15:38
Default Re: UDF switch macro vs. call Law
  #3
Christian
Guest
 
Posts: n/a
Hi Allan.

Thank you for your answer. Now I have a new question

When the dpm is using a law, say law 2, do you know if the calculation is staying in that law until the two conditions no more are valid, or does the solver "look up" and into my switch macro. I would like to modify the density of the particle while the law 2 is active and not only after.

Christian
  Reply With Quote

Old   November 22, 2002, 16:10
Default Re: UDF switch macro vs. call Law
  #4
Allan
Guest
 
Posts: n/a
Christian,

I'm not sure. I'm guessing you want to know if you set your own switch, will Fluent still try to use its own criteria to calculate the density.

In general, you would want to define things as explicity as possible - thus use your own switch rather than that built in to Fluent.

One way to check if it is using your definition for density is to plot the particle density versus time using the Fluent built-in panel and then plot the particle law for time for the same particle, and see when your density function is valid.

Or you can simply include a print statement where your density function is used to print the law at that time.

Some of the laws seem to calculate the density using the evaporating component as a volume fraction rather than a mass fraction, which I circumvented.
  Reply With Quote

Old   November 24, 2002, 02:15
Default Re: UDF switch macro vs. call Law
  #5
mahdi saniee nezhad
Guest
 
Posts: n/a
Dear sir I have a problem with this title. If it's possible for you please send me your received responses. Very thanks for your attention to my request. With the best regards. Mahdi saniee nezhad

  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
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29
UDF to switch on energy equation each time step galary FLUENT 1 January 5, 2006 20:24
UDF to switch on energy equation after X iteration mat w FLUENT 6 December 5, 2005 08:35
Switch problem! using 2 custom udf laws at the same time HP FLUENT 0 September 15, 2004 09:48


All times are GMT -4. The time now is 16:38.