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

Problem in parallel simulation with UDF and Rotational domain

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AlexanderZ
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 12, 2019, 14:35
Default Problem in parallel simulation with UDF and Rotational domain
  #1
New Member
 
João de Sousa Bomfim Neto
Join Date: Oct 2017
Location: Maranguape, Ceará, Brasil
Posts: 27
Rep Power: 9
Joao Bomfim is on a distinguished road
Dear all,
I'm trying to do a simulation in parallel with deploying a simple UDF, to increase the rotation speed (RPM) smoothly. UDF build and load normally. The UDF is bellow:

Code:
#include "udf.h"
DEFINE_ZONE_MOTION(fmotion, omega, axis, origin, velocity, time, dtime)
{
    #if! RP_HOST
    if (time < 0.15)
    {
        *omega = 2400.0 * time;
    }
    else
    {
        *omega = 400.0;
    }
    N3V_D(velocity, =, 0.0, 0.0, 0.0);
    N3V_S(origin, =, 0.0);        /* default values, line could be omitted */
    N3V_D(axis, =, 0.0, 0.0, 1.0);     /* default values, line could be omitted */
    #endif
    return;
}
When I run the fluent with the UDF, I get the error "Error at host: floating point exception". The case runs in double precision and 4 partitions.
Does anyone have any idea how to fix it?
All te best for all.
Joao Bomfim is offline   Reply With Quote

Old   July 12, 2019, 17:16
Default
  #2
New Member
 
João de Sousa Bomfim Neto
Join Date: Oct 2017
Location: Maranguape, Ceará, Brasil
Posts: 27
Rep Power: 9
Joao Bomfim is on a distinguished road
To include: Fluent runs by Visual Studio prompt.
Joao Bomfim is offline   Reply With Quote

Old   July 14, 2019, 19:38
Default
  #3
New Member
 
João de Sousa Bomfim Neto
Join Date: Oct 2017
Location: Maranguape, Ceará, Brasil
Posts: 27
Rep Power: 9
Joao Bomfim is on a distinguished road
Update: Fluent with UDF runs normally in serial mode, but without directive #if !RP_HOST. Someone have an idea?
Joao Bomfim is offline   Reply With Quote

Old   July 14, 2019, 23:00
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you don't special macros for parallel for this code
you don't need:
Code:
 #if! RP_HOST
Ansys FLuent Customization manual, Parallelizing Your Serial UDF chapter

best regards
Joao Bomfim likes this.
AlexanderZ is offline   Reply With Quote

Old   July 15, 2019, 10:20
Default
  #5
New Member
 
João de Sousa Bomfim Neto
Join Date: Oct 2017
Location: Maranguape, Ceará, Brasil
Posts: 27
Rep Power: 9
Joao Bomfim is on a distinguished road
I DONT BELIEVE!!!
I swear I Tried this, but I think tried without VS prompt inicialization.AlexanderZ, I'm very very grateful, I dont know how I let this escape. Thanks so much again, have a great Day!!!!
Joao Bomfim is offline   Reply With Quote

Old   July 15, 2019, 16:22
Default
  #6
New Member
 
João de Sousa Bomfim Neto
Join Date: Oct 2017
Location: Maranguape, Ceará, Brasil
Posts: 27
Rep Power: 9
Joao Bomfim is on a distinguished road
Taking advantage of the post, how could I monitor the angular velocity? Did he have to get tangential velocity and divide by radius? (Simulation of a VAWT with sliding mesh). Or is there an easier way? If I have to use the tangential velocity, which Report Type is most appropriate? Thanks in advance.
Joao Bomfim is offline   Reply With Quote

Old   July 16, 2019, 00:43
Default
  #7
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
I have no experience about it, there are several tutorials on youtube
https://www.google.com/search?q=Simu...hrome&ie=UTF-8

best regards
Joao Bomfim likes this.
AlexanderZ is offline   Reply With Quote

Old   July 16, 2019, 18:10
Default
  #8
New Member
 
João de Sousa Bomfim Neto
Join Date: Oct 2017
Location: Maranguape, Ceará, Brasil
Posts: 27
Rep Power: 9
Joao Bomfim is on a distinguished road
I think I got.

  • Report definitions -> Surface report -> Integral and field variable = Tangential velocity for one blade of vawt.
  • Report definitions -> Surface report ->Area for the same blade of vawt.
  • Create an expression like this: (Tangential Velocity of blade/Area of blade)/Radius of vawt. The result will be angular velocity of turbine, if the CAD geometry is ok. In my UDF, angular velocity is increased up to 400 RPM in 90 timesteps. Looks like this worked. Big hug!
Attached Images
File Type: jpg gráfico RPM.JPG (41.0 KB, 9 views)
Joao Bomfim is offline   Reply With Quote

Reply

Tags
parallel, rotating, 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
UDF Changing Rotational Velocity sdarmayuda Fluent UDF and Scheme Programming 0 September 18, 2017 11:36
Problem with UDF for CG Circular Motion luthlau Fluent UDF and Scheme Programming 1 September 16, 2016 03:08
Wankel Engine UDF Problem Kxt908 Fluent UDF and Scheme Programming 0 February 2, 2014 09:15
Dynamic Mesh- Parallel UDF DE HEART Fluent UDF and Scheme Programming 14 August 11, 2010 02:29
udf in MRF to update the rotational speed Jam FLUENT 0 August 21, 2005 13:50


All times are GMT -4. The time now is 11:18.