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

Debug source terms

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 28, 2009, 08:25
Smile Debug source terms
  #1
New Member
 
qiang xia
Join Date: Mar 2009
Posts: 8
Rep Power: 17
alanlove is on a distinguished road
Hi,everyone
I am writing a marco of DEFINE_SOURCE as followings:
DEFINE_SOURCE(mass_source,c, t, dS, eqn)
{
real source_mass;
if (C_T(c,t)>800.0)
{
source_mass=Density*PI*area*root/C_VOLUME(c,t);
dS[eqn]=0.0;
}
else
dS[eqn]=source_mass=0.0;
return source_mass;
}
My problem is: In order to validate my codes, How can I get the value of source_mass?Any ideas,thank u very much.
alanlove is offline   Reply With Quote

Old   December 28, 2009, 22:12
Default
  #2
New Member
 
Nan Zhang
Join Date: Mar 2009
Location: Beijing
Posts: 4
Rep Power: 17
nonyear is on a distinguished road
Send a message via MSN to nonyear
you can do that
(1) Use Messsage function (if the mesh file is small)
Add
Message(" source_mass = %g\n", source_mass);
before

return source_mass;

then you can get the message

(2) Through a UDM(if the mesh file is big)
define a UDM
then add
C_UDMI(c,t, 0)=source_mass;
before
return source_mass;

then you can get the message through display the coutour
nonyear is offline   Reply With Quote

Old   December 29, 2009, 07:04
Default
  #3
New Member
 
qiang xia
Join Date: Mar 2009
Posts: 8
Rep Power: 17
alanlove is on a distinguished road
Big Thanks
alanlove is offline   Reply With Quote

Old   December 29, 2009, 07:24
Default
  #4
New Member
 
Nan Zhang
Join Date: Mar 2009
Location: Beijing
Posts: 4
Rep Power: 17
nonyear is on a distinguished road
Send a message via MSN to nonyear
you are welcome.
nonyear 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
Using source terms jsm Main CFD Forum 4 August 20, 2009 07:44
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51
UDF Scalar Code: HT 1 Greg Perkins FLUENT 8 October 20, 2000 13:40


All times are GMT -4. The time now is 15:39.