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

Dynamic mesh for Piston type wave maker in NWT simulation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 6, 2023, 21:51
Default Dynamic mesh for Piston type wave maker in NWT simulation
  #1
New Member
 
Chakra
Join Date: Jul 2023
Posts: 1
Rep Power: 0
Chakra is on a distinguished road
Hello friends,
I am new in this forum,
I am trying to simulate the piston type wave maker for water tank. I have generated the code for the sinusoidal motion for the left wall of the tank. But while I interpret the code in ansys fluent I am getting some parse error in line 10. I Tried but failed. Please can you help me to resolve my issue.
Thanks in advance

#include<stdio.h>
#include“udf.h”
#define A 0.07
#define pi M_PI
#define LW 8
#define g 9.81
#define h 6
#define L0 40.0
#define L1 60.0
DEFINE_CG_MOTION(piston_moving, dt, cg_vel, cg_omega, time, dtime)
{
real u = 0;
real ww = 0;
real kk = 0;
real S = 0;
real cc = 0;
real T = 0;
kk = 2.0*pi/LW;
cc = sqrt(g*tanh(kk*h)/kk); /*wave velocity*/
ww = kk*cc; /*circle frequency*/
T = 2.0*pi/ww;
S = 0.5*A*(2*kk*h+sinh(2*kk*h))/pow(sinh(kk*h),2);
if(time <= T)
{
u = ww*S*time*cos(ww*time)/(2*T);
cg_vel[0] = u;
}
else
{
u = ww*S*cos(ww*time)/2;
cg_vel[0] = u;
}
}
Chakra is offline   Reply With Quote

Old   July 14, 2023, 07:42
Default Similar query
  #2
New Member
 
Debayan Bera
Join Date: Jul 2023
Posts: 3
Rep Power: 3
Debayan is on a distinguished road
I'm also working on something similar. I wanted to know how you're adding the mass of the plunger and whether you're using overset meshing. Would be of great help if you could let me know.
Debayan is offline   Reply With Quote

Reply


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
[Commercial meshers] Problem with Mesh conversion from FLUENT Meshing to OpenFOAM mn17jyf OpenFOAM Meshing & Mesh Conversion 3 November 1, 2023 10:49
pimpleFoam - Flow across an oscillating cylinder simulation crashing iceman53y OpenFOAM Running, Solving & CFD 2 November 27, 2019 06:13
inlet pressure is higher than outlet pressure for fan sivakumar OpenFOAM Pre-Processing 16 December 30, 2017 15:16
Divergent temperature in chtMultiRegion(Simple)Foam akrasemann OpenFOAM Running, Solving & CFD 13 March 24, 2014 03:54
Error during initialization of "rhoSimpleFoam" kornickel OpenFOAM Running, Solving & CFD 8 September 17, 2013 06:37


All times are GMT -4. The time now is 18:54.