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

1/4 3D Drop box 6Dof example UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes
  • 1 Post By acasas
  • 1 Post By Sixkillers
  • 1 Post By vasava
  • 1 Post By acasas
  • 4 Post By acasas

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 2, 2015, 09:50
Default UDF to define body symmetry
  #1
Member
 
acasas's Avatar
 
Antonio Casas
Join Date: May 2013
Location: world
Posts: 85
Rep Power: 13
acasas is on a distinguished road
I did perform the 2D drop box example in a 3D fashion. It took a lot of resources and time as expected. Now I´m willing to do the same but just over a 1/4 of it applying symmetry in order to reduce resources and run time. In fluent help says: If your moving object consists of a half model, then the symmetry plane has to be specified by providing the components of the normal vector, properties[SDOF_SYMMETRY_X],properties[SDOF_SYMMETRY_Y], and properties[SDOF_SYMMETRY_Z].
I don´t exactly know how to define this . Imagine my symmetry planes are the xy and zy , so the normal vectors are the 0,0,1 and the 1,0,0 . Should my UDF look like this? Please help

#include "udf.h"

DEFINE_SDOF_PROPERTIES(test_box, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 666.66;
prop[SDOF_IXX] = 129.6296;
prop[SDOF_IYY] = 111.1111;
prop[SDOF_IZZ] = 129.6296;
prop[SDOF_SYMMETRY_X] = 1,0,0;
prop[SDOF_SYMMETRY_Z] = 0,0,1;

printf ("\n2d_test_box: Updated 6DOF properties");

}


Or like this:


#include "udf.h"

DEFINE_SDOF_PROPERTIES(test_box, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 666.66;
prop[SDOF_IXX] = 129.6296;
prop[SDOF_IYY] = 111.1111;
prop[SDOF_IZZ] = 129.6296;
prop[SDOF_SYMMETRY_X] = TRUE;
prop[SDOF_SYMMETRY_Z] = TRUE;

printf ("\n2d_test_box: Updated 6DOF properties");

}
Megan likes this.

Last edited by acasas; January 5, 2015 at 09:03. Reason: typo and desperate need for an answer
acasas is offline   Reply With Quote

Old   January 5, 2015, 16:58
Default
  #2
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17
macfly is on a distinguished road
Hi,

Sorry, I have no idea, I never worked with this kind of udf. I would suggest to implement a very basic case, experiment with SDOF_SYMMETRY_X-Y-Z, and check if you obtain the expected results.

François

Last edited by macfly; January 6, 2015 at 02:27.
macfly is offline   Reply With Quote

Old   January 7, 2015, 05:59
Default
  #3
Member
 
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 15
Sixkillers is on a distinguished road
Hi,

I have never used 6DOF model, but according to above quote from documentation, which you have posted, you can have only 1 symmetry plane (i.e. 1/2 model).

Symmetry plane is defined by a normal vector. For example I would to have symmetry plane YZ, so normal vector is (1, 0, 0). In UDF it is:

prop[SDOF_SYMMETRY_X] = 1;
prop[SDOF_SYMMETRY_X] = 0;
prop[SDOF_SYMMETRY_X] = 0;

Cheers
acasas likes this.
Sixkillers is offline   Reply With Quote

Old   January 7, 2015, 06:09
Default
  #4
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
I havent done this type of example so I can not give you the right answer. However from the comment in red I understood that you have to input a vector. So something like the following could work.

Code:
prop[SDOF_SYMMETRY_X] = [1 0 0];
Or
Code:
prop[SDOF_SYMMETRY_X] = (1 0 0);
acasas likes this.
vasava is offline   Reply With Quote

Old   January 7, 2015, 07:03
Default
  #5
Member
 
acasas's Avatar
 
Antonio Casas
Join Date: May 2013
Location: world
Posts: 85
Rep Power: 13
acasas is on a distinguished road
Quote:
Originally Posted by Sixkillers View Post
Hi,

I have never used 6DOF model, but according to above quote from documentation, which you have posted, you can have only 1 symmetry plane (i.e. 1/2 model).

Symmetry plane is defined by a normal vector. For example I would to have symmetry plane YZ, so normal vector is (1, 0, 0). In UDF it is:

prop[SDOF_SYMMETRY_X] = 1;
prop[SDOF_SYMMETRY_X] = 0;
prop[SDOF_SYMMETRY_X] = 0;

Cheers
Thank´s sixkillers, you gave me the right information, but I do believe there is a mistake when you did ctrl+c and ctrl+v.... you forgot to change the X...I believe it should be like:

prop[SDOF_SYMMETRY_X] = 1;
prop[SDOF_SYMMETRY_Y] = 0;
prop[SDOF_SYMMETRY_Z] = 0;

thank´s a lot!

Last edited by acasas; January 7, 2015 at 09:47. Reason: SIXKILLERS MAY HAVE DONE A MISTAKE
acasas is offline   Reply With Quote

Old   January 7, 2015, 07:07
Default
  #6
Member
 
acasas's Avatar
 
Antonio Casas
Join Date: May 2013
Location: world
Posts: 85
Rep Power: 13
acasas is on a distinguished road
Quote:
Originally Posted by vasava View Post
I havent done this type of example so I can not give you the right answer. However from the comment in red I understood that you have to input a vector. So something like the following could work.

Code:
prop[SDOF_SYMMETRY_X] = [1 0 0];
Or
Code:
prop[SDOF_SYMMETRY_X] = (1 0 0);

If I use the symmetry, the mass and the moments of inertia must be for the full body , isn´t it? I believe I read it somewhere but I´m not sure. Please correct me if I´m wrong.

Thank´s a lot!!!
acasas is offline   Reply With Quote

Old   January 7, 2015, 07:19
Default
  #7
Member
 
acasas's Avatar
 
Antonio Casas
Join Date: May 2013
Location: world
Posts: 85
Rep Power: 13
acasas is on a distinguished road
Quote:
Originally Posted by acasas View Post
If I use the symmetry, the mass and the moments of inertia must be for the full body , isn´t it? I believe I read it somewhere but I´m not sure. Please correct me if I´m wrong.

Thank´s a lot!!!

Sorry guys for this last question.... the answer to my own question is yes, in case of a symmetry plane use, the mass and the moments of inertia must be for the full body. The red text below is from the fluent documentation

2.6.5. DEFINE_SDOF_PROPERTIES

2.6.5.1. Description

You can use DEFINE_SDOF_PROPERTIES to specify custom properties of moving objects for the six-degrees of freedom (SDOF) solver in ANSYS 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.

Note that if the moving object is modeled as a half model and includes a plane of symmetry, then you have to specify this by providing the normal vector to the symmetry plane. Further, all SDOF properties such as mass and moments of inertia have to be specified for the full body if a symmetry plane is specified.
Megan likes this.
acasas is offline   Reply With Quote

Old   January 7, 2015, 15:48
Default
  #8
Member
 
acasas's Avatar
 
Antonio Casas
Join Date: May 2013
Location: world
Posts: 85
Rep Power: 13
acasas is on a distinguished road
Guys, just for any one interested on the body symmetry UDF, I did test half of a 3D box similar to the 2D box example available on internet, and I did get same pressure results and same tensions for a 1 way FSI.

if symmetry for the YZ plane then, use:

prop[SDOF_SYMMETRY_X] = 1;
prop[SDOF_SYMMETRY_Y] = 0;
prop[SDOF_SYMMETRY_Z] = 0;
Far, ghost82, ram_call and 1 others like this.
acasas is offline   Reply With Quote

Old   July 21, 2015, 17:42
Default
  #9
Far
Senior Member
 
Sijal
Join Date: Mar 2009
Location: Islamabad
Posts: 4,558
Blog Entries: 6
Rep Power: 54
Far has a spectacular aura aboutFar has a spectacular aura about
Send a message via Skype™ to Far
excellent work
Far is offline   Reply With Quote

Old   November 28, 2023, 03:53
Default 6dof box
  #10
New Member
 
Mozhgan
Join Date: Nov 2023
Posts: 2
Rep Power: 0
Megan is on a distinguished road
Quote:
Originally Posted by acasas View Post
I did perform the 2D drop box example in a 3D fashion. It took a lot of resources and time as expected. Now I´m willing to do the same but just over a 1/4 of it applying symmetry in order to reduce resources and run time. In fluent help says: If your moving object consists of a half model, then the symmetry plane has to be specified by providing the components of the normal vector, properties[SDOF_SYMMETRY_X],properties[SDOF_SYMMETRY_Y], and properties[SDOF_SYMMETRY_Z].
I don´t exactly know how to define this . Imagine my symmetry planes are the xy and zy , so the normal vectors are the 0,0,1 and the 1,0,0 . Should my UDF look like this? Please help

#include "udf.h"

DEFINE_SDOF_PROPERTIES(test_box, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 666.66;
prop[SDOF_IXX] = 129.6296;
prop[SDOF_IYY] = 111.1111;
prop[SDOF_IZZ] = 129.6296;
prop[SDOF_SYMMETRY_X] = 1,0,0;
prop[SDOF_SYMMETRY_Z] = 0,0,1;

printf ("\n2d_test_box: Updated 6DOF properties");

}


Or like this:


#include "udf.h"

DEFINE_SDOF_PROPERTIES(test_box, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 666.66;
prop[SDOF_IXX] = 129.6296;
prop[SDOF_IYY] = 111.1111;
prop[SDOF_IZZ] = 129.6296;
prop[SDOF_SYMMETRY_X] = TRUE;
prop[SDOF_SYMMETRY_Z] = TRUE;

printf ("\n2d_test_box: Updated 6DOF properties");

}
Thanks for everyone's solutions. Would you please inform me that in a 6 dof wave-structure interaction, should I preserve the tool bodies in Boolean operation or not?
I think i have a similiar project
Megan 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
UDF Problem ozgur Fluent UDF and Scheme Programming 18 January 17, 2016 15:40
UDF for pressure drop calculation alireza_b Fluent UDF and Scheme Programming 0 May 10, 2013 12:03
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 07:43
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
Help Parallelizing UDF AndresC FLUENT 0 February 25, 2010 16:50


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