|
[Sponsors] |
trying to adapt the tutorial: Using a UDF Flexible Oscillating membrane |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 15, 2013, 14:38 |
trying to adapt the tutorial: Using a UDF Flexible Oscillating membrane
|
#1 |
New Member
musab
Join Date: Nov 2012
Posts: 11
Rep Power: 14 |
I read that tutorial name : Using a UDF to Control the Dynamic Mesh of a
Flexible Oscillating Membrane ... and i used it in fluent .. also i used the attachment c file ( that name is : butterfly-flex.c ) the moving type of membrane is ( moving arc motion ) . but i note that the memberane length from this coordinates (-0.083552375 , -0.1 ) To (0.083552375 , -0.1 ) , which mean its length is 0.16710475 , and the center of arc is ( 0 , -0.1 ) .. i need that :- 1- i need to use this ( arc motion ) for another membrane that have another length ( in example for 0.5 ) , what i shall to do in the C file ?? 2- i need to put the center of arc in another point in x direction ( in example : ( 3 , -0.1 ) , how i can do that ?? 3- what is the mean of any one of these ? cg_vel[0] = 0.0; cg_vel[1] = 0.0; cg_vel[2] = 0.0; cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = omega; Last edited by bluAero; April 15, 2013 at 15:13. |
|
April 15, 2013, 18:14 |
|
#2 |
New Member
musab
Join Date: Nov 2012
Posts: 11
Rep Power: 14 |
can any one help me ??
|
|
April 16, 2013, 04:44 |
|
#3 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
1- i need to use this ( arc motion ) for another membrane that have another length ( in example for 0.5 ) , what i shall to do in the C file ??
You need to change the 'moving_arc' part of the UDF based on the dimension and motion of your boundaries. If you have the original UDF (and the PDF file) the comments in the UDF are very useful. 2- i need to put the center of arc in another point in x direction ( in example : ( 3 , -0.1 ) , how i can do that ?? You must do that in fluent (dynamic mesh settings). However you must modify the UDF in accordance to how you anticipate the motion. 3- what is the mean of any one of these ? cg_vel[0] = 0.0; cg_vel[1] = 0.0; cg_vel[2] = 0.0; cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = omega; There are the linear and angular velocities of the center of gravity. |
|
August 14, 2013, 02:55 |
|
#4 |
New Member
Ankit Gohel
Join Date: Jul 2013
Posts: 5
Rep Power: 13 |
i am also facing the same problem.
I have to oscillate the cylinder to 180 degree. i have to write the udf for the same. but when i enter the udf it takes the inlet velocity insted of rotational motion.... |
|
August 15, 2013, 05:47 |
|
#5 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
@Ankit: Can you post your UDF here? we can have a look.
|
|
August 23, 2013, 01:55 |
|
#6 |
New Member
Ankit Gohel
Join Date: Jul 2013
Posts: 5
Rep Power: 13 |
#include"udf.h"
#define ZONE_ID 3 #include<math.h> #define dynamesh_tools.h #define p 22/7 #define a 2*p /* when a=2*p*f, and take f=1*/ static real omega[2]_prev = 0.0; DEFINE_CG_MOTION(cylinder, dt, velocity, omega, time, dtime) { Thread*t; face_t f; velocity[0]=0.0; velocity[1]=0.0; velocity[2]=0.0; omega[0]=0.0; omega[1]=0.0; if (!Data_Valid_P()) return; t=DT_OMEGA_CG(t); domega[2] = a*sin(2*p*f*dtime); omega[2]_prev += omega[2]; Message ("time = %f, omega[2] = %f\n", time, omega[2]_prev); omega[2]=a*sin(2*p*f*time); } but in that omega[2] equation there is forcing frequency... still i dont know... because when i go through the paper they always talk about ration of f/f0. where f0 is vortex shadding frequency of steady cylinder. If there is some prob than pls help me Thanks |
|
August 23, 2013, 04:13 |
|
#7 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
You have so many problems with your UDF.
1. The use of 'f'. 2. The use of 't' 3. The use of 'omega[2]_prev'. 4. I think that you can avoid using 'a' and 't=DT_OMEGA_CG(t);'. And so on......... Here is the corrected UDF. #include "udf.h" #include "dynamesh_tools.h" #define p1 22/7 #define f1 1.0 DEFINE_CG_MOTION(cylinder, dt, cg_vel, cg_omega, time, dtime) { Thread*t; face_t f; real omega_prev; omega_prev = 0.0; cg_vel[0] = 0.0; cg_vel[1] = 0.0; cg_vel[2] = 0.0; if (!Data_Valid_P()) return; /* t = DT_OMEGA_CG(dt); */ cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = (2*p1)*sin(2*p1*f1*dtime); omega_prev = omega_prev + cg_omega[2]; Message ("time = %f, omega[2] = %f\n", time, omega_prev); } Lets see if that works for you.. |
|
August 28, 2013, 11:48 |
|
#8 |
New Member
Ankit Gohel
Join Date: Jul 2013
Posts: 5
Rep Power: 13 |
Sir, Now its create problem in compile.
Its give an error report nmake is not recognized as an internal or external command Open_udf_library: the system cant find the file specified. |
|
August 31, 2013, 00:14 |
|
#9 |
New Member
Ankit Gohel
Join Date: Jul 2013
Posts: 5
Rep Power: 13 |
Finally, the udf is successfully executed. Thnaks... But after some iteration it gives an error " divergence detected in AMG solver: Pressure correction"
|
|
December 7, 2015, 18:12 |
divergence detected
|
#10 |
New Member
nabaouia
Join Date: Aug 2014
Posts: 14
Rep Power: 12 |
I 've faced the same problem when simulating a dynamic mesh of a moving membrane after some iterations it diverge ''divergence detected in AMG solver x momentum .'
I tried with all the velocity and pressure schemes , different time steps , adaptative time step, implicit update... but always thye same divergence just the error message change from'' x momentum to y momentum '' stuck there for months just wanna be cool to not get crazy . |
|
June 26, 2018, 04:55 |
|
#11 |
Member
Join Date: Nov 2017
Posts: 54
Rep Power: 9 |
hello
please say how i can find case and data file? |
|
June 26, 2018, 04:56 |
|
#12 | |
Member
Join Date: Nov 2017
Posts: 54
Rep Power: 9 |
Quote:
please say how i can find case and data file? |
||
June 26, 2018, 07:04 |
case file
|
#13 |
Member
Join Date: Nov 2017
Posts: 54
Rep Power: 9 |
I search on web but I can't find the case file
please send me address link or send case file to my Email. Samanabasian95@gmail.com |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for object oscillating in direction of flow | tsaget | Fluent UDF and Scheme Programming | 11 | September 15, 2015 16:07 |
tutorial for solving oscillating cylinder problem | CH | FLUENT | 8 | April 2, 2014 11:56 |
Help! Compiled UDF problem 4 Wave tank tutorial | Shane | FLUENT | 1 | September 3, 2010 03:32 |
UDF tutorial 18 | jan | Main CFD Forum | 0 | October 16, 2006 05:05 |
UDF in MDM Tutorial | mAx | FLUENT | 0 | November 28, 2005 08:34 |