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

Source is incomplete in parallel mode

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 7, 2018, 15:42
Default Source is incomplete in parallel mode
  #1
New Member
 
Beichao Hu
Join Date: Nov 2017
Posts: 9
Rep Power: 8
sakura006 is on a distinguished road
I have problem with parallel mode. I defined a source in UDF. If I run in serial mode, everything is fine. However, if I run in parallel mode with the same code, the region of the source is incomplete. That means part of the source is missing in the region where it should be. I am not sure if it was my parallelization problem.
Here is the code.

DEFINE_SOURCE(Wsource,c,tc,dsource,Vequation)
{
#if !RP_HOST
real x[ND_ND];
real x_c;
real y_c;
real z_c;
real wsource=0.0;
real volume2;
C_CENTROID(x,c,tc);

x_c = x[0];
y_c = x[1];
z_c = x[2];

volume2 = 0.029890004736;
dsource[Vequation] = 0.0;

if ((x_c >= 4.572 && x_c <= 5.1816) && (y_c >= 0.0254 && y_c <= 0.508) && (z_c >= -1.016 && z_c <= -0.9144))
{
wsource = -1.0 * (rho_air * server_area * mv_hots1 * ((mv_hots1 / porosity) - mv_hots1)) / volume2;
}
else if ((x_c >= 4.572 && x_c <= 5.1816) && (y_c >= 0.508 && y_c <= 0.9906) && (z_c >= -1.016 && z_c <= -0.9144))
{
wsource = -1.0 * (rho_air * server_area * mv_hots2 * ((mv_hots2 / porosity) - mv_hots2)) / volume2;
}
else if ((x_c >= 4.572 && x_c <= 5.1816) && (y_c >= 0.9906 && y_c <= 1.4732) && (z_c >= -1.016 && z_c <= -0.9144))
{
wsource = -1.0 * (rho_air * server_area * mv_hots3* ((mv_hots3 / porosity) - mv_hots3)) / volume2;
}
else if ((x_c >= 4.572 && x_c <= 5.1816) && (y_c >= 1.4732 && y_c <= 1.9558) && (z_c >= -1.016 && z_c <= -0.9144))
{
wsource = -1.0 * (rho_air * server_area * mv_hots4 * ((mv_hots4 / porosity) - mv_hots4)) / volume2;
}
else
{
wsource = 0.0;
}

C_UDMI(c,tc,1) = wsource;
return wsource;
#endif

}

Here is the source in serial mode
serial source.PNG
And source in parallel mode
parallel source.PNG

Last edited by sakura006; June 7, 2018 at 15:47. Reason: Adding pictures
sakura006 is offline   Reply With Quote

Old   June 18, 2018, 10:29
Default
  #2
New Member
 
Beichao Hu
Join Date: Nov 2017
Posts: 9
Rep Power: 8
sakura006 is on a distinguished road
Can someone help me?
sakura006 is offline   Reply With Quote

Reply

Tags
define_source, parallel, udf


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
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 tlcoons OpenFOAM Installation 13 April 20, 2016 17:34
[PyFoam] Problems with the new PyFoam release zfaraday OpenFOAM Community Contributions 13 December 9, 2014 18:58
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 18:00
[swak4Foam] swak4Foam-groovyBC build problem zxj160 OpenFOAM Community Contributions 18 July 30, 2013 13:14
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08


All times are GMT -4. The time now is 00:14.