|
[Sponsors] |
December 28, 2009, 08:25 |
Debug source terms
|
#1 |
New Member
qiang xia
Join Date: Mar 2009
Posts: 8
Rep Power: 17 |
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. |
|
December 28, 2009, 22:12 |
|
#2 |
New Member
|
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 |
|
December 29, 2009, 07:04 |
|
#3 |
New Member
qiang xia
Join Date: Mar 2009
Posts: 8
Rep Power: 17 |
Big Thanks
|
|
December 29, 2009, 07:24 |
|
#4 |
New Member
|
you are welcome.
|
|
|
|
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 |