-
-
December 21, 2019 at 6:31 am
AndyHor
SubscriberHi everyone,
I am first time user to UDF, and using ansys 2016.
I am trying to put expressions for a 3D , 1/8 concentric sphere, and the fluid is driven by lower surface to oscillate with respect to z-axis. Two pictures is shown in below for better view.
In 2019 version, i can put the boundary conditions as expression as sin(t/1
)*1[rad/s] for the lower oscillating surface.
If I want to write in UDF, can I write in this way ? Please advise.
/**********************************************************************
oscillatingwall.c
UDF for specifying a transient simple harmonic motion
***********************************************************************/
#include "udf.h"
#define angular_freq 1
DEFINE_GRID_MOTION(inneroscillatingwall, dt, cg_vel, cg_omega, time, dtime)
{
Thread*t; /*is the pointer to the structure that store*/
real omega;
/* reset velocities */
NV_S (vel, =, 0.0);
NV_S (omega, =, 0.0);
t=DT_THREAD(dt); /*Get the tread pointer for which this motion is defined*/
omega = sin(angular_freq*time); /*rotional speed about axis*/
cg_vel[0] = 0.0; /*x y z translation*/
cg_vel[1] = 0.0;
cg_vel[2] = 0.0;
cg_omega[0]=0.0; /* x y z rotational axis*/
cg_omega[1]=0.0;
cg_omega[2]=omega;
}
-
December 23, 2019 at 12:42 am
AndyHor
SubscriberI have tried several methods, and amended some code, this is what I currently facing, could anyone please help ?
#include "udf.h"
#define angular_freq 1.0
DEFINE_CG_MOTION(inneroscillatingwall, dt, cg_vel, cg_omega, time, dtime)
{
real omega;
omega = sin(angular_freq*time); /*rotional speed about axis*/
cg_vel[0] = 0.0; /*x y z translation*/
cg_vel[1] = 0.0;
cg_vel[2] = 0.0;
cg_omega[0]=0.0; /* x y z rotational axis*/
cg_omega[1]=0.0;
cg_omega[2]=omega;
}
/*When I press build button, it gives */
Setting Post Processing and Surfaces information ... Done.
Copied C:UsersDell T7600DesktopChee Hao AnsysHip Gap_filesdp0FFFFluent/C:UsersDell T7600DesktopChee Hao AnsysHip Gap_filesdp0FFFFluentUDF oscillating.c to libudfsrc
Creating user_nt.udf file for 3ddp ...
(system "copy "C:PROGRA~1ANSYSI~1v170fluent"fluent17.0.0srcudfmakefile_nt.udf "libudfwin643ddpmakefile" ")
1 file(s) copied.
(chdir "libudf")(chdir "win643ddp")'nmake' is not recognized as an internal or external command,
operable program or batch file.
Done.
/*When I press load button, it gives*/
Opening library "C:UsersDell T7600DesktopChee Hao AnsysHip Gap_filesdp0FFFFluentC:UsersDell T7600DesktopChee Hao AnsysHip Gap_filesdp0FFFFluentlibudf"...RPC RCX_SC_SET_ERR_MSG failed: RPC: Can't encode arguments
Error: The UDF library you are trying to load (C:UsersDell T7600DesktopChee Hao AnsysHip Gap_filesdp0FFFFluentlibudf) is not compiled for 3ddp on the current platform (win64).
The system cannot find the file specified.
C:UsersDell T7600DesktopChee Hao AnsysHip Gap_filesdp0FFFFluentC:UsersDell T7600DesktopChee Hao AnsysHip Gap_filesdp0FFFFluentlibudfwin643ddplibudf.dll
Error: The UDF library you are trying to load (C:UsersDell T7600DesktopChee Hao AnsysHip Gap_filesdp0FFFFluentlibudf) is not compiled for 3ddp on the current platform (win64).nnThe system cannot find the file specified.
nnC:UsersDell T7600DesktopChee Hao AnsysHip Gap_filesdp0FFFFluentC:UsersDell T7600DesktopChee Hao AnsysHip Gap_filesdp0FFFFluentlibudfwin643ddplibudf.dll
Error Object: #f
/*And then I restart Ansys, it somehow have the UDF file, when I load to the boundary, and press ok, it gives */
Error: received a fatal signal (Segmentation fault).
Error: received a fatal signal (Segmentation fault).
Error Object: #f
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- Difference between K-epsilon and K-omega Turbulence Model
- The solver failed with a non-zero exit code of : 2
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error: Received signal SIGSEGV
-
5454
-
3403
-
2473
-
1310
-
1022
© 2023 Copyright ANSYS, Inc. All rights reserved.