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

UDF chip-exec and multiple UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2016, 03:18
Default UDF chip-exec and multiple UDF
  #1
New Member
 
mohammad
Join Date: Mar 2014
Posts: 16
Rep Power: 12
mmkkeshavarzi is on a distinguished road
Hi guys,
First, I interpreted a UDF in Fluent 16 and during the calculation it shows the following message ( but the calculation goes on without any intruption)
chip-exec : UDF: argument 5: incorrect type (0) int pointer expectedchip-exe

I don't know what is this about.

Second, I want to load a udf for certain time in my calculations and after that i want to continue my calculation with another udf, i encounter with somthing like "signal fatal error"?!!! I don't know how to load a udf for some time steps and another one for the other time steps

I wonder if anyone can help me especially with the second one.
thanks
mmkkeshavarzi is offline   Reply With Quote

Old   February 15, 2016, 20:17
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
First, compile your UDFs instead of interpreting them (typically solves many issues). Second, explain in detail what you're doing and what UDFs you're using; conditional statements can be used to apply code at certain times (for example, t > t0).
`e` is offline   Reply With Quote

Old   February 16, 2016, 06:12
Default
  #3
New Member
 
mohammad
Join Date: Mar 2014
Posts: 16
Rep Power: 12
mmkkeshavarzi is on a distinguished road
Quote:
Originally Posted by `e` View Post
First, compile your UDFs instead of interpreting them (typically solves many issues). Second, explain in detail what you're doing and what UDFs you're using; conditional statements can be used to apply code at certain times (for example, t > t0).
Thanks but in fact, I tried to compile my UDF but unfortunately, I encountered with so many errors that I gave up.

My UDF is as follows, SDOF UDF for a dropping box. A coupled force exerted on the box in 0.01 sec and after that, the box dropped freely. Instead of the coupled force in inserted an equivalent force and moment on the body

I did first interpret this UDF:
/************************************************** *****
SDOF property compiled UDF with external forces/moments
************************************************** *****/
#include "udf.h"

DEFINE_SDOF_PROPERTIES(box, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 15;
prop[SDOF_IXX] = 1.56;
prop[SDOF_IYY] = 2.5;
prop[SDOF_IZZ] = 2.5;
prop[SDOF_LOAD_F_Y] = -500;
prop[SDOF_LOAD_M_Z] = -41.8;
printf ("\nbox: updated 6DOF properties");
}

And then I interpreted this one;

/************************************************** *****
SDOF property compiled UDF with external forces/moments
************************************************** *****/
#include "udf.h"

DEFINE_SDOF_PROPERTIES(box, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 15;
prop[SDOF_IXX] = 1.56;
prop[SDOF_IYY] = 2.5;
prop[SDOF_IZZ] = 2.5;
prop[SDOF_LOAD_F_Y] = 0;
prop[SDOF_LOAD_M_Z] = 0;
printf ("\nbox: updated 6DOF properties");
}

First, I don't know if my procedure is right or not?!

Second, I interpreted the second UDF for the t>0.01 it worked fine ( but also the chip-exec argument incorrect as the first UDF) but the box rotates and do not stop after I zero the force and moment ( the mass force on the CG must rotate the box to the horizontal line)

Third, I don't know whether the moment and force inserted on the CG or i have to define where to insert them?
mmkkeshavarzi is offline   Reply With Quote

Old   February 16, 2016, 06:25
Default
  #4
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13
Bruno Machado is on a distinguished road
Quote:
Originally Posted by mmkkeshavarzi View Post
Thanks but in fact, I tried to compile my UDF but unfortunately, I encountered with so many errors that I gave up.

My UDF is as follows, SDOF UDF for a dropping box. A coupled force exerted on the box in 0.01 sec and after that, the box dropped freely. Instead of the coupled force in inserted an equivalent force and moment on the body

I did first interpret this UDF:
/************************************************** *****
SDOF property compiled UDF with external forces/moments
************************************************** *****/
#include "udf.h"

DEFINE_SDOF_PROPERTIES(box, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 15;
prop[SDOF_IXX] = 1.56;
prop[SDOF_IYY] = 2.5;
prop[SDOF_IZZ] = 2.5;
prop[SDOF_LOAD_F_Y] = -500;
prop[SDOF_LOAD_M_Z] = -41.8;
printf ("\nbox: updated 6DOF properties");
}

And then I interpreted this one;

/************************************************** *****
SDOF property compiled UDF with external forces/moments
************************************************** *****/
#include "udf.h"

DEFINE_SDOF_PROPERTIES(box, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 15;
prop[SDOF_IXX] = 1.56;
prop[SDOF_IYY] = 2.5;
prop[SDOF_IZZ] = 2.5;
prop[SDOF_LOAD_F_Y] = 0;
prop[SDOF_LOAD_M_Z] = 0;
printf ("\nbox: updated 6DOF properties");
}

First, I don't know if my procedure is right or not?!

Second, I interpreted the second UDF for the t>0.01 it worked fine ( but also the chip-exec argument incorrect as the first UDF) but the box rotates and do not stop after I zero the force and moment ( the mass force on the CG must rotate the box to the horizontal line)

Third, I don't know whether the moment and force inserted on the CG or i have to define where to insert them?
The compiled should have worked without any error (IMPORTANT TIP: always put .0 after a real/double number, otherwise compiler can get lost and lead to wrong results - self experience). Try to activate the Dynamic Mesh before compiling it.

Quote:
> Copied H:\a.c to lib\src
Creating user_nt.udf file for 3ddp ...
(system "copy "c:\PROGRA~1\ANSYSI~1\v150\fluent"\fluent15.0.0\sr c\makefile_nt.udf "lib\win64\3ddp\makefile" ")
1 file(s) copied.
(chdir "lib")(chdir "win64\3ddp")# Generating ud_io1.h
a.c
# Generating udf_names.c because of makefile a.obj
udf_names.c
udf_names.c(8) : warning C4113: 'void (*)()' differs in parameter lists from 'void (*)(void)'
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj a.obj
Microsoft (R) Incremental Linker Version 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.

Creating library libudf.lib and object libudf.exp

Done.
Bruno Machado is offline   Reply With Quote

Reply

Tags
fluent - udf, fluent 16.0, interpreted, interpreted 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



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