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

UDF 3D Rotation for Fluid in concentric sphere

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 21, 2019, 01:18
Default UDF 3D Rotation for Fluid in concentric sphere
  #1
New Member
 
AndyHor
Join Date: Dec 2019
Location: Melaka Malaysia
Posts: 5
Rep Power: 6
andyhor is on a distinguished road
Hi everyone,

I am first time user to UDF, and using ansys 2016. I need UDF for the lower momentum boundary condition.

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.

I have attached the 2 diagrams below of the fluid surfaces.

In 2019 version, i can put the boundary conditions as expression as sin(t/1[s])*1[rad/s] for the lower oscillating surface.

If I want to write in UDF, can I write in this way ? Please help.

[CODE]
/************************************************** ********************
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;

}
Attached Images
File Type: jpg Overall Surface.jpg (109.1 KB, 7 views)
File Type: jpg Inner Surface.jpg (135.9 KB, 7 views)
andyhor is offline   Reply With Quote

 

Tags
fluent, udf code


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 Rotation lepetitmort Fluent UDF and Scheme Programming 38 October 15, 2020 06:29
sinusoidal rotation UDF denis Kim Fluent UDF and Scheme Programming 9 May 22, 2020 17:39
UDF Dynamic Meshing for Rotation and Translation Aidan100 Fluent UDF and Scheme Programming 2 August 16, 2015 23:39
Simulating a rotating sphere, with axis of rotation normal to flow direction gamer_lester FLUENT 2 December 19, 2014 14:47
meshing F1 front wing Steve FLUENT 0 April 17, 2003 12:37


All times are GMT -4. The time now is 09:41.