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

6DOF angular acceleration

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2016, 10:41
Default 6DOF angular acceleration
  #1
Member
 
ERMACORA Florian
Join Date: May 2016
Posts: 39
Rep Power: 9
flo90000 is on a distinguished road
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;
}
I add enough UDM location and don't have some problems during the compilation. And I have this error:

Quote:
Info: 6DOF: can't compute angular acceleration.
Check moments/products of inertia.
Updating mesh at time level N...
Warning: multiple subdivision required on zone 8. Subdivide using Constant Ratio.
Error: received a fatal signal (Segmentation fault).
After some research I found this solution to decrease the limit of moments of inertia but it doesn't work

Quote:
(rpsetvar 'dynamesh/sdof/minimum-cutoff-moments 1e-50)
http://www.cfd-online.com/Forums/flu...eleration.html

So I want to know if there are other possibilities and which or/and where is my fault

Thanks for your help
flo90000 is offline   Reply With Quote

Old   April 29, 2019, 10:54
Default
  #2
Member
 
Marcin
Join Date: Jun 2016
Posts: 96
Rep Power: 9
destroy is on a distinguished road
Hey, did you solve your problem?
destroy 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
6DOF: can't compute angular acceleration laurentb FLUENT 7 July 26, 2019 12:54
angular acceleration sma_mort FLUENT 0 March 19, 2013 03:31
angular acceleration sma_mort Main CFD Forum 0 March 19, 2013 03:27
Angular Acceleration in Fluent? harikrishnan_k FLUENT 1 December 27, 2012 01:27
How to define angular acceleration Randre Fluent UDF and Scheme Programming 0 April 20, 2010 13:21


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