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

Ohmic Heater Tutorial

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2013, 07:22
Default Ohmic Heater Tutorial
  #1
New Member
 
Tom Tranter
Join Date: Mar 2013
Location: Leeds, UK
Posts: 21
Rep Power: 13
pmtgt is on a distinguished road
Hi,

I found an old fluent tutorial on the web which would be useful for my studies but no source code for the UDF. Does anyone have a copy?

http://cfd.iut.ac.ir/files/ohmic_heater.pdf

Many Thanks
Tom
pmtgt is offline   Reply With Quote

Old   September 5, 2013, 13:57
Default
  #2
Senior Member
 
ghost82's Avatar
 
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27
ghost82 will become famous soon enough
Here:

Code:
#include "udf.h"
#define electric_potential 0

/******************************************************************************************
  This UDF calculates the heat generated due to the Joule heating.
  This head generated is added as volumetric source term in the energy equation
********************************************************************************************/


DEFINE_SOURCE(Energy_Source, c, t, dS, eqn)
{
 real NV_VEC(CURRENT_DENSITY);
 real Source_Joule,Source;


/******************************************************************************************
  Fluent has some utilities that can be use in UDFs to access or manipulate vector
  quantities and deal with two and three dimensions. These utilities are implemented
  as macros in the code. For more details about this utilities please refer section
  6.6 of Fluent6.2 User Guide: http://www.fluentusers.com/fluent/doc/ori/html/udf/node161.htm
********************************************************************************************/

  Source_Joule = 0.0;

     NV_VS(CURRENT_DENSITY, =, C_UDSI_G(c, t, electric_potential), *,
                      C_UDSI_DIFF(c, t, electric_potential));

     NV_VS(CURRENT_DENSITY, =, CURRENT_DENSITY,*, -1);

     if(C_UDSI_DIFF(c, t, electric_potential) > 1e-6)
       {
         Source_Joule = NV_DOT(CURRENT_DENSITY, CURRENT_DENSITY)/
                         C_UDSI_DIFF(c, t, electric_potential);

                         C_UDMI(c,t,electric_potential) = Source_Joule;
       }

   Source = Source_Joule;

 dS[eqn] = 0.0;

 return Source;
}
ghost82 is offline   Reply With Quote

Old   January 26, 2016, 05:05
Default
  #3
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 16
gaza is on a distinguished road
Quote:
Originally Posted by ghost82 View Post
Here:

Code:
#include "udf.h"
#define electric_potential 0

/******************************************************************************************
  This UDF calculates the heat generated due to the Joule heating.
  This head generated is added as volumetric source term in the energy equation
********************************************************************************************/


DEFINE_SOURCE(Energy_Source, c, t, dS, eqn)
{
 real NV_VEC(CURRENT_DENSITY);
 real Source_Joule,Source;


/******************************************************************************************
  Fluent has some utilities that can be use in UDFs to access or manipulate vector
  quantities and deal with two and three dimensions. These utilities are implemented
  as macros in the code. For more details about this utilities please refer section
  6.6 of Fluent6.2 User Guide: http://www.fluentusers.com/fluent/doc/ori/html/udf/node161.htm
********************************************************************************************/

  Source_Joule = 0.0;

     NV_VS(CURRENT_DENSITY, =, C_UDSI_G(c, t, electric_potential), *,
                      C_UDSI_DIFF(c, t, electric_potential));

     NV_VS(CURRENT_DENSITY, =, CURRENT_DENSITY,*, -1);

     if(C_UDSI_DIFF(c, t, electric_potential) > 1e-6)
       {
         Source_Joule = NV_DOT(CURRENT_DENSITY, CURRENT_DENSITY)/
                         C_UDSI_DIFF(c, t, electric_potential);

                         C_UDMI(c,t,electric_potential) = Source_Joule;
       }

   Source = Source_Joule;

 dS[eqn] = 0.0;

 return Source;
}
Hi ghost82,

Can you provide the rest of the files from this tutorial?
__________________
best regards
pblasiak
gaza is offline   Reply With Quote

Old   January 26, 2016, 05:45
Default
  #4
New Member
 
Tom Tranter
Join Date: Mar 2013
Location: Leeds, UK
Posts: 21
Rep Power: 13
pmtgt is on a distinguished road
Hi,

I see the original link I posted doesn't work any more for the tutorial. I made my own geometry and mesh with ICEM. If you personal message me your email I'd be happy to send you these files.

Thanks
pmtgt is offline   Reply With Quote

Old   January 26, 2016, 10:46
Default
  #5
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 16
gaza is on a distinguished road
I wrote to you by PM
__________________
best regards
pblasiak
gaza is offline   Reply With Quote

Reply


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
Problem on Fluent Tutorial: Horizontal Film Boilig Feng FLUENT 2 April 13, 2013 06:34
chtMultiRegionFoam: discrepancy on x-bounds on a region (heater) raniisc14 OpenFOAM Verification & Validation 1 August 30, 2012 18:25
[Virtualization] OpenFOAM oriented tutorial on using VMware Player - support thread wyldckat OpenFOAM Installation 2 July 11, 2012 17:01
Reversed flow error with thin film heater MK FLUENT 1 February 12, 2009 11:26
modeling of a bulk heater Mahmoud Main CFD Forum 0 March 12, 2008 11:32


All times are GMT -4. The time now is 20:06.