|
[Sponsors] |
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 18, 2015, 10:42 |
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF
|
#1 |
Member
Antonio Casas
Join Date: May 2013
Location: world
Posts: 85
Rep Power: 13 |
Hi,
I need to generate a small udf code to apply forces and moment over a body C.G. that travels with initial velocity conditions. Itīs a transient, VOF, 6 DOF, dynamic mesh type problem (all this settings are already established) . This forces will change its direction in time depending on C.G. rotation. Body mass, moments of inertia, force magnitude and other details needed will be provided. I'm willing to pay 50 $. Itīs a box with some thickness and some material. Itīs CG its at 0,0,0 and I use symmetry respect the xy plane. The properties then are described in the following UDF #include "udf.h" DEFINE_SDOF_PROPERTIES(test_box, prop, dt, time, dtime) { prop[SDOF_MASS] = 471; prop[SDOF_IXX] = 130.83; prop[SDOF_IYY] = 130.83; prop[SDOF_IZZ] = 130.83; prop[SDOF_SYMMETRY_X] = 0; prop[SDOF_SYMMETRY_Y] = 0; prop[SDOF_SYMMETRY_Z] = 1; printf ("\n2d_test_box: Updated 6DOF properties"); } I just need to include a moment and force with some magnitude, that of course will change due to the rotation of the body due to the external pressure from the flow. You can use for example a 1.5 Newtons in the x direction. Since this box is 1x1x1 m and I apply this force over one point , lets say at x=0.5, y=-0.5 and z=0, then over the cg, there will be a force and a moment. the force will be 1.5 N and the moment will be Mz=-1.5x0.5=-0.75 Mm . here there is an example of what I believe should be something very similar, but I donīt know anything about udf so Iīm not sure how this guy included the values and where. So I canīt trak the variables and I donīt know where to include them in thsi example Below I attach info relevant on what I believe its necessary for this type of UDF which I don't have experience and programming knowledge. thankīs a lot 2.6.4 DEFINE SDOF PROPERTIES Description You can use DEFINE SDOF PROPERTIES to specify custom properties of moving objects for the six-degrees of freedom (SDOF) solver in FLUENT. These include mass, moment and products of inertia, and external forces and moment properties. The properties of an object which can consist of multiple zones can change in time, if desired. External load forces and moments can either be specified as global coordinates or body coordinates. In addition, you can specify custom transformation matrices using DEFINE SDOF PROPERTIES. Usage DEFINE SDOF PROPERTIES(name,properties,dt,time,dtime) Argument Type Description symbol name UDF name. real *properties Pointer to the array that stores the SDOF properties. Dynamic Thread *dt Pointer to structure that stores the dynamic mesh attributes that you have specified (or that are calculated by FLUENT). real time Current time. real dtime Time step. Function returns void There are four arguments to DEFINE SDOF PROPERTIES: name, properties, dt, and dtime. You provide the name of the UDF. properties, dt, and dtime are variables that are passed by the FLUENT solver to your UDF. The property array pointer that is passed to your function allows you to specify values for any of the following SDOF properties: SDOF_MASS /* mass */ SDOF_IXX, /* moment of inertia */ SDOF_IYY, /* moment of inertia */ SDOF_IZZ, /* moment of inertia */ SDOF_IXY, /* product of inertia */ SDOF_IXZ, /* product of inertia */ SDOF_IYZ, /* product of inertia */ SDOF_LOAD_LOCAL, /* boolean */ SDOF_LOAD_F_X, /* external force */ SDOF_LOAD_F_Y, /* external force */ SDOF_LOAD_F_Z, /* external force */ SDOF_LOAD_M_X, /* external moment */ SDOF_LOAD_M_Y, /* external moment */ SDOF_LOAD_M_Z, /* external moment */ The boolean prop[SDOF LOAD LOCAL] can be used to determine whether the forces and moments are expressed in terms of global coordinates (FALSE) or body coordinates (TRUE). The default value for prop[SDOF LOAD LOCAL] is FALSE. Custom Transformation Variables The default transformations used by FLUENT are typical for most aerospace and other types of applications. However, if your model requires custom transformations, you can specify these matrices in your SDOF UDF. First set the SDOF CUSTOM TRANS boolean to TRUE. Then use the macros listed below to define custom coordination rotation and derivative rotation matrices. CTRANS is the body-global coordinate rotation matrix and DTRANS is the body-global derivative rotation matrix. SDOF_CUSTOM_TRANS, /* boolean */ SDOF_CTRANS_11, /* coordinate rotation matrices */ SDOF_CTRANS_12, SDOF_CTRANS_13, SDOF_CTRANS_21, SDOF_CTRANS_22, SDOF_CTRANS_23, SDOF_CTRANS_31, SDOF_CTRANS_32, SDOF_CTRANS_33, SDOF_DTRANS_11, /* derivative rotation matrices */ SDOF_DTRANS_12, SDOF_DTRANS_13, SDOF_DTRANS_21, SDOF_DTRANS_22, SDOF_DTRANS_23, SDOF_DTRANS_31, SDOF_DTRANS_32, SDOF_DTRANS_33, Example 1 The following UDF, named stage, is a simple example of setting mass and moments of inertia properties for a moving object. This UDF is typical for applications in which a body is dropped and the SDOF solver computes the body’s motion in the flow field. /************************************************** ********** Simple example of a SDOF property UDF for a moving body ************************************************** ************/ #include "udf.h" DEFINE_SDOF_PROPERTIES(stage, prop, dt, time, dtime) { prop[SDOF_MASS] = 800.0; prop[SDOF_IXX] = 200.0; prop[SDOF_IYY] = 100.0; prop[SDOF_IZZ] = 100.0; printf ("\nstage: updated 6DOF properties"); } Example 2 The following UDF named delta missile specifies case injector forces and moments that are time-dependent. Specifically, the external forces and moments depend on the current angular orientation of the moving object. Note that this UDF must be executed as a compiled UDF. /************************************************** ***** SDOF property compiled UDF with external forces/moments ************************************************** *****/ #include "udf.h" DEFINE_SDOF_PROPERTIES(delta_missile, prop, dt, time, dtime) { prop[SDOF_MASS] = 907.185; prop[SDOF_IXX] = 27.116; prop[SDOF_IYY] = 488.094; prop[SDOF_IZZ] = 488.094; /* add injector forces, moments */ { register real dfront = fabs (DT_CG (dt)[2] - (0.179832*DT_THETA (dt)[1])); register real dback = fabs (DT_CG (dt)[2] + (0.329184*DT_THETA (dt)[1])); if (dfront <= 0.100584) { prop[SDOF_LOAD_F_Z] = 10676.0; prop[SDOF_LOAD_M_Y] = -1920.0; } if (dback <= 0.100584) { prop[SDOF_LOAD_F_Z] += 42703.0; prop[SDOF_LOAD_M_Y] += 14057.0; } } printf ("\ndelta_missile: updated 6DOF properties"); } Last edited by acasas; January 19, 2015 at 14:25. |
|
January 23, 2015, 08:26 |
|
#2 |
Member
Mehul Patel - CFD Expert
Join Date: Jul 2013
Location: Ahmedabad
Posts: 41
Rep Power: 13 |
Hello,
We have executed various CFD projects for worldwide clients. You can send your requirements at ino@hitechcfd.com or visit HiTechCFD.com |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
6dof model - floating body | flinde | FLUENT | 13 | March 6, 2021 15:32 |
How to input external moment in 6dof in function W.r. t C-G location of the body? | anbu2cfd | Fluent UDF and Scheme Programming | 1 | March 30, 2016 14:50 |
apply body force udf to just one injection | rima_se2003 | Fluent UDF and Scheme Programming | 0 | December 31, 2014 18:00 |
to separate pressure force and viscous force using udf | ignayars | Fluent UDF and Scheme Programming | 1 | October 19, 2014 08:26 |
how to add body force in a duct | jane | FLUENT | 0 | March 28, 2004 00:13 |