# N3V_D,N3V_S（what's the meaning）

 Register Blogs Members List Search Today's Posts Mark Forums Read February 25, 2014, 08:05 N3V_D,N3V_S（what's the meaning） #1 New Member   He Zhao Join Date: Feb 2013 Location: Shanghai(now) Posts: 11 Rep Power: 10 Hi， Could anyone explain me that whats the meaning of N3V_D,N3V_S? I saw the two macro in （2.3.9. DEFINE_ZONE_MOTION）in UDF help #include "udf.h" DEFINE_ZONE_MOTION(fmotion,omega,axis,origin,veloc ity,time,dtime) { if (time < 0.1) { *omega = 2500.0 * time; } else { *omega = 250.0; } N3V_D (velocity,=,1.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 */ return; } but I cant find N3V_D,N3V_S in help. another question: N3V_S(origin,=,0.0); I think origin is 3 dimension,(for example N3V_S(origin,=,0.0,0.0,0.0)),I don't know why it just has 1 dimension in UDF help. thankyou Regards, Zhereal vavnoon likes this.   February 25, 2014, 09:41 #2 Senior Member   Join Date: Nov 2013 Posts: 1,913 Rep Power: 23 If 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. In general, these definitions are hidden in "C:\Program Files\ANSYS Inc\v???\fluent\fluent??.?.?\src" In mem.h and global.h, I found: NV_D(a,EQ,x0,x1,x2)=ND_D((a),(a),(a),EQ,x0,x1,x2) ND_D(a0,a1,a2,EQ,x0,x1,x2)=ND_VEC((a0)EQ(x0),(a1)E Q(x1),(a2)EQ(x2)) NV_S(a,EQ,s)=ND_VEC((a)EQ(s),(a)EQ(s),(a)EQ(s)) ND_VEC(x,y,z)=x,y,z So, expanding your first expression, assuming 3D: N3V_D (velocity,=,1.0,0.0,0.0); becomes NV_D (velocity,=,1.0,0.0,0.0); becomes ND_D(velocity,velocity,velocity,=,1.0,0.0,0.0) becomes ND_VEC(velocity=1.0,velocity=0.0,velocity=0.0) becomes velocity=1.0,velocity=0.0,velocity=0.0 Similarly, with your second expression: N3V_S(origin,=,0.0); becomes NV_S(origin,=,0.0); becomes ND_VEC(origin=0.0,origin=0.0,origin=0.0); becomes origin=0.0,origin=0.0,origin=0.0; So with N3V_S you give every component the same value. dvolkind, sadjad.s, Silence and 1 others like this.   February 25, 2014, 22:41 #3 New Member   He Zhao Join Date: Feb 2013 Location: Shanghai(now) Posts: 11 Rep Power: 10 Thank you very much, pakk! Today I will have a try.   April 13, 2014, 10:42 #4
New Member

sam daysley
Join Date: Feb 2013
Posts: 28
Rep Power: 10 Quote:
 Originally Posted by pakk If 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. In general, these definitions are hidden in "C:\Program Files\ANSYS Inc\v???\fluent\fluent??.?.?\src" In mem.h and global.h, I found: NV_D(a,EQ,x0,x1,x2)=ND_D((a),(a),(a),EQ,x0,x1,x2) ND_D(a0,a1,a2,EQ,x0,x1,x2)=ND_VEC((a0)EQ(x0),(a1)E Q(x1),(a2)EQ(x2)) NV_S(a,EQ,s)=ND_VEC((a)EQ(s),(a)EQ(s),(a)EQ(s)) ND_VEC(x,y,z)=x,y,z So, expanding your first expression, assuming 3D: N3V_D (velocity,=,1.0,0.0,0.0); becomes NV_D (velocity,=,1.0,0.0,0.0); becomes ND_D(velocity,velocity,velocity,=,1.0,0.0,0.0) becomes ND_VEC(velocity=1.0,velocity=0.0,velocity=0.0) becomes velocity=1.0,velocity=0.0,velocity=0.0 Similarly, with your second expression: N3V_S(origin,=,0.0); becomes NV_S(origin,=,0.0); becomes ND_VEC(origin=0.0,origin=0.0,origin=0.0); becomes origin=0.0,origin=0.0,origin=0.0; So with N3V_S you give every component the same value.

Hi PAKK and Zhereal,

i don't suppose you know how i would use NV_D or NV_S to change the origin to another position do you? i cant seem to get the rotational origin to change?   April 13, 2014, 15:11 #5 New Member   He Zhao Join Date: Feb 2013 Location: Shanghai(now) Posts: 11 Rep Power: 10 Hi daysley, My English is not good.I thick you will want to change origin,right? you can use "ND_VEC(origin=a,origin=b,origin=c);" or "origin=0.0,origin=0.0,origin=0.0;" have a good day   April 13, 2014, 15:13 #6 New Member   sam daysley Join Date: Feb 2013 Posts: 28 Rep Power: 10 Thank you very much zhereal I appreciate it :-)   December 3, 2020, 01:55 #7
New Member

Tanuj Srivastava
Join Date: Mar 2019
Posts: 15
Rep Power: 4 Quote:
 Originally Posted by pakk If 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. In general, these definitions are hidden in "C:\Program Files\ANSYS Inc\v???\fluent\fluent??.?.?\src" In mem.h and global.h, I found: NV_D(a,EQ,x0,x1,x2)=ND_D((a),(a),(a),EQ,x0,x1,x2) ND_D(a0,a1,a2,EQ,x0,x1,x2)=ND_VEC((a0)EQ(x0),(a1)E Q(x1),(a2)EQ(x2)) NV_S(a,EQ,s)=ND_VEC((a)EQ(s),(a)EQ(s),(a)EQ(s)) ND_VEC(x,y,z)=x,y,z So, expanding your first expression, assuming 3D: N3V_D (velocity,=,1.0,0.0,0.0); becomes NV_D (velocity,=,1.0,0.0,0.0); becomes ND_D(velocity,velocity,velocity,=,1.0,0.0,0.0) becomes ND_VEC(velocity=1.0,velocity=0.0,velocity=0.0) becomes velocity=1.0,velocity=0.0,velocity=0.0 Similarly, with your second expression: N3V_S(origin,=,0.0); becomes NV_S(origin,=,0.0); becomes ND_VEC(origin=0.0,origin=0.0,origin=0.0); becomes origin=0.0,origin=0.0,origin=0.0; So with N3V_S you give every component the same value.

What if I have to deal with 2-D? I want to fix origin velocity to be 0. I want my system to SHM wrt to origin.   December 3, 2020, 02:55 #8 Senior Member   Join Date: Nov 2013 Posts: 1,913 Rep Power: 23 In 2D the concept is exactly the same. Just ignore the third coordinate.   December 8, 2020, 01:04 frame motion doubt #9 New Member   Tanuj Srivastava Join Date: Mar 2019 Posts: 15 Rep Power: 4 I have a simple 2D box having fluid inside with no other contact from outside (or no interface). When I try to give it SHM, using the code below, by checking frame motion option in cell zone condition, the zone does not look rotate. #include "udf.h" #define Freq 0.125 #define angular_freq 2.0*M_PI*Freq #define tetmax 5.0*M_PI/180 DEFINE_ZONE_MOTION(UCTP8AMP05, omega, axis, origin, velocity, time, dtime) { real t = CURRENT_TIME; N3V_D(velocity, = , 0.0, 0.0, 0.0); *omega = tetmax*angular_freq*cos(angular_freq*t); } I followed video on youtube related to frame motion "https://www.youtube.com/watch?v=tHd2ODQCcxM&t=1039s&ab_channel=Ansys-Tutor" but I want unsteady case. So my confusion is that, when I apply frame motion rotating about Z axis with the UDF mentioned above, does it really look to rotate or it looks stationary but in actual it rotates. (In mesh motion you can see it rotating, but it needs some interface I guess)  Tags n3v_d, n3v_s Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

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