|
[Sponsors] |
June 23, 2016, 11:41 |
6DOF angular acceleration
|
#1 | ||
Member
ERMACORA Florian
Join Date: May 2016
Posts: 39
Rep Power: 10 |
Hello
I want to simulate the movement of a valve with the 6DOF solver. This is my code: Code:
#include "udf.h" #include "math.h" DEFINE_SDOF_PROPERTIES(Clapet, prop, dt, time, dtime) { prop[SDOF_MASS]=1.067e-7; prop[SDOF_IZZ]=5.33e-11; prop[SDOF_ZERO_TRANS_X]=TRUE; prop[SDOF_ZERO_TRANS_Y]=TRUE; prop[SDOF_ZERO_TRANS_Z]=TRUE; prop[SDOF_ZERO_ROT_X]=TRUE; prop[SDOF_ZERO_ROT_Y]=TRUE; prop[SDOF_ZERO_ROT_Z]=FALSE; prop[SDOF_LOAD_M_Z]=-9.81*0.0108*sin(DT_THETA(dt)[2])*0.0108; Message("\n 2d : Updated 6DOF properties DT_THETA_Z:%e, Mz:%e, Mass%e\n", DT_THETA(dt)[2], prop[SDOF_LOAD_M_Z], prop [SDOF_MASS]); } Code:
#include "udf.h" DEFINE_SOURCE(xmom_source,c,t,dS,eqn) { static real pos[ND_ND]; static real con, source, x, y; static real X_MIN, X_MAX, Y_MIN, Y_MAX, C2; static int i; static Domain *domain; C_CENTROID(pos,c,t); x=pos[0]; y=pos[1]; X_MIN=1e-3; X_MAX=1.16e-3; Y_MIN=11e-3; Y_MAX=0.01082; C2=50000.0; i=0; if(x>X_MIN) i++; if(x<X_MAX) i++; if(y>Y_MIN) i++; if(y<Y_MAX) i++; if(i==4) { con=C2*0.5*C_R(c,t); source=-con*fabs(C_U(c,t))*C_U(c,t); dS[eqn]=-2.0*con*fabs(C_U(c,t)); } else { source=0.0; } C_UDMI(c,t,0)=source; return source; } DEFINE_SOURCE(ymom_source,c,t,dS,eqn) { static real pos[ND_ND]; static real con, source, x, y; static real X_MIN, X_MAX, Y_MIN, Y_MAX, C2; static int i; static Domain *domain; C_CENTROID(pos,c,t); x=pos[0]; y=pos[1]; X_MIN=1e-3; X_MAX=1.16e-3; Y_MIN=0.01082; Y_MAX=0.011; C2=50000.0; i=0; if(x>X_MIN)i++; if(x<X_MAX)i++; if(y>Y_MIN)i++; if(y<Y_MAX)i++; if(i==4) { con=C2*0.5*C_R(c,t); source=-con*fabs(C_V(c,t))*C_V(c,t); dS[eqn]=-2.0*con*fabs(C_V(c,t)); } else { source=0.0; } C_UDMI(c,t,0)=source; return source; } Quote:
Quote:
So I want to know if there are other possibilities and which or/and where is my fault Thanks for your help |
|||
April 29, 2019, 11:54 |
|
#2 |
Member
Marcin
Join Date: Jun 2016
Posts: 98
Rep Power: 10 |
Hey, did you solve your problem?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
6DOF: can't compute angular acceleration | laurentb | FLUENT | 7 | July 26, 2019 13:54 |
angular acceleration | sma_mort | FLUENT | 0 | March 19, 2013 04:31 |
angular acceleration | sma_mort | Main CFD Forum | 0 | March 19, 2013 04:27 |
Angular Acceleration in Fluent? | harikrishnan_k | FLUENT | 1 | December 27, 2012 02:27 |
How to define angular acceleration | Randre | Fluent UDF and Scheme Programming | 0 | April 20, 2010 14:21 |