-
-
December 3, 2020 at 7:21 am
srivastavatanuj
SubscriberHello Sir,nBelow I am attaching a thread which I found in cfd-online discussion forum and that point out the explanation of term N3V_D etc. My query is at the bottom.n--------------------------------------------------------------------------------------------------------------------------------------------nIf you are working in 3D, then N3V_D means the same as NV_D. If you are working in 2D, then N3V_D is not defined. So you can ignore the 3.nnIn general, these definitions are hidden in C:\Program Files\ANSYS Inc\v???\fluent\fluent??.?.?\srcnIn mem.h and global.h, I found:NV_D(a,EQ,x0,x1,x2)=ND_D((a)[0],(a)[1],(a)[2],EQ,x0,x1,x2)nND_D(a0,a1,a2,EQ,x0,x1,x2)=ND_VEC((a0)EQ(x0),(a1)E Q(x1),(a2)EQ(x2))nNV_S(a,EQ,s)=ND_VEC((a)[0]EQ(s),(a)[1]EQ(s),(a)[2]EQ(s))nND_VEC(x,y,z)=x,y,znnSo, expanding your first expression, assuming 3D:nN3V_D (velocity,=,1.0,0.0,0.0);nbecomesnNV_D (velocity,=,1.0,0.0,0.0);nbecomesnND_D(velocity[0],velocity[1],velocity[2],=,1.0,0.0,0.0)nbecomesnND_VEC(velocity[0]=1.0,velocity[1]=0.0,velocity[2]=0.0)nbecomesnvelocity[0]=1.0,velocity[1]=0.0,velocity[2]=0.0nnSimilarly, with your second expression:nN3V_S(origin,=,0.0); becomesnNV_S(origin,=,0.0);nbecomesnND_VEC(origin[0]=0.0,origin[1]=0.0,origin[2]=0.0);nbecomesnorigin[0]=0.0,origin[1]=0.0,origin[2]=0.0;nnSo with N3V_S you give every component the same value.n--------------------------------------------------------------------------------------------------------------------------------------------nNow query is that, if I want my 2-D system (simple box, nothing is outside the box) to do SHM about the origin. For that I will provide angular velocity about the origin. I am setting N3V_D(velocity, = , 0.0, 0.0, 0.0); in my UDF so that there will be 0 velocity. In the discussion posted above, it is mentioned that, for 2-D N3V_D is not defined then what should be done for 2-D case .I am also giving angular velocity like *omega = tetmax*angular_freq*cos(angular_freq*time); and putting this in cell zone condition----> frame motion. Is it ok to do that? System is transient and takes time to complete.n -
December 3, 2020 at 1:51 pm
Rob
Forum ModeratorYou can do that, but as I have no idea what you're trying to do I can't say it'll solve your problem. If you're using frame motion you don't need a UDF, just use an expression. n -
December 8, 2020 at 7:24 am
srivastavatanuj
SubscriberI am trying to give SHM to a 2D square box having fluid inside about the origin. origin is the center of the box. I guess it is SRF problem as there is nothing outside the box.nI want the box to have some amplitide and time period, it is not complete revolution, So UDF might be needed. nusing frame motion, When I see the animation, even after giving UDF for SHM, frame does not seem to rotate in animation. I am using the above expressions. Is there is any problem is UDF or in SRF, when we see animation, motion does not seem to occur?nCode for SHM is just below-nn#include udf.hn#define Freq 0.125n#define angular_freq 2.0*M_PI*Freqn#define tetmax 5.0*M_PI/180nDEFINE_ZONE_MOTION(UCTP8AMP05, omega, axis, origin, velocity, time, dtime)n{nreal t = CURRENT_TIME;nN3V_D(velocity, = , 0.0, 0.0, 0.0);n*omega = tetmax*angular_freq*cos(angular_freq*t);n}nnnMoreover, do I need to give expression for coriolis acceleration and centripetel accelerations as well? But I saw in the ansys manual that when we call frame motion, respective equations are enabled having all the accelerations. See thelink.nnThere is no mesh interface, can I use mesh motion instead of frame motion?n -
December 8, 2020 at 11:41 am
DrAmine
Ansys EmployeeYou might have a look into dynamic mesh and rigid body motion. There a profile file or UDF is required to provide the motion of the rigid body.n
-
- The topic ‘Query related to UDF’ is closed to new replies.

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.
- legend min and max
- Ensight hot iron palette from an image
- Streamlines in EnSight using MRI data
- Import MRI data into Ensight
- FLUENT APPLICATIION ERROR
- Total Surface Heat Flux Calculation in Fluent
- Difference between “total pressure” and “absolute pressure”?
- Drop Test of a Water-Filled Tube
- Minimum Orthogonal Quality Less than 0.01 For Transonic Airfoil Flow Analysis
- obtaining pressure distribution by making points in ansys
-
8808
-
4658
-
3151
-
1680
-
1470
© 2023 Copyright ANSYS, Inc. All rights reserved.