|
[Sponsors] |
September 24, 2019, 07:08 |
Fluent UDF for parallel processing
|
#1 |
New Member
--
Join Date: Sep 2019
Posts: 3
Rep Power: 7 |
Hey there,
I am writing a UDF for parallel computing at the moment. I am using the Compute_Force_And_Moment function. But I am not sure if I need to adjust the use of it in parallel processing. Since i didn't find much information on the web i wrote this function, with which i will investigate how the function works. #include "udf.h" #define area_factor 2.01713 DEFINE_EXECUTE_AT_END(parallel_force) { int force_fluid_domain_id; int force_boundary_id; real force_gas_x = 0.0; real force_gas_y = 0.0; #if !RP_HOST Thread *t_force; Domain *force_fluid_domain; real body_force[ND_ND], moment[ND_ND], cg[ND_ND]; #endif #if !RP_NODE force_fluid_domain_id = RP_Get_Integer("input/force_fluid_domain_id"); force_boundary_id = RP_Get_Integer("input/force_boundary_id"); #endif host_to_node_int_2(force_fluid_domain_id, force_boundary_id); #if !RP_HOST force_fluid_domain = Get_Domain(force_fluid_domain_id); t_force = Lookup_Thread(force_fluid_domain, force_boundary_id); Compute_Force_And_Moment(force_fluid_domain, t_force, cg, body_force, moment, TRUE); force_gas_x = body_force[0] / area_factor; force_gas_y = body_force[1] / area_factor; Message("\nForce X on Node %d before adding: %f N\n",myid,force_gas_x); Message("\nForce Y on Node %d before adding: %f N\n",myid,force_gas_y); #if RP_NODE force_gas_x = PRF_GRSUM1(force_gas_x); force_gas_y = PRF_GRSUM1(force_gas_y); #endif #endif node_to_host_real_2(force_gas_x, force_gas_y); #if !RP_NODE Message("Force X after adding over nodes: %f N\n",force_gas_x); Message("Force Y after adding over nodes: %f N\n",force_gas_y); #endif } What I want to do with this function, is to see if the area on which the force gets calculated is split between the nodes. But when I start the calculation, fluent calculates the force but only prints the last two messages to the console. And afterwards i get an error. This is what is printed to the console: riting "| gzip -2cf > SYS-26-00000.dat.gz"... Writing temporary file C:\\Users\\jensb\\AppData\\Local\\Temp\\flntgz-91683 ... Done. Force X after adding over nodes: 7.781368 N Force Y after adding over nodes: 120852.712844 N Error at host: floating point exception MPI Application rank 0 exited before MPI_Finalize() with status 2 Why do I get the floating point exception error ? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Two questions on Fluent UDF | Steven | Fluent UDF and Scheme Programming | 7 | March 23, 2018 04:22 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
solving a conduction problem in FLUENT using UDF | Avin2407 | Fluent UDF and Scheme Programming | 1 | March 13, 2015 03:02 |
UDF problem caused by various version of Fluent | Yurong | FLUENT | 3 | January 15, 2006 11:57 |
UDF of Zimont model in fluent | Z | Main CFD Forum | 0 | February 17, 2005 04:07 |