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

Combining Prescribed Motion and 6-DOF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2020, 12:16
Default Combining Prescribed Motion and 6-DOF
  #1
New Member
 
Join Date: Jun 2020
Posts: 8
Rep Power: 6
aCamb27 is on a distinguished road
I'm currently using Fluent, and am wondering if there is a way to prescribe a constant velocity in one direction, but have motion in another direction be dictated by the hydrodynamic forces?

Specifically, I want to track how an object translates in the y direction as a result of arms flapping about the z-axis. I have been able to create the flapping motion using a UDF with the CG_MOTION macro, but am unsure how to combine or integrate this into the 6 DOF solver.

Can I simply assign 2 UDFs to the dynamic mesh zones, or is there a way to write a SDOF_PROPERTIES function that takes into account constant rotational velocity?

Thank you for the help!
aCamb27 is offline   Reply With Quote

Old   June 18, 2020, 08:32
Default Sdof
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
You can add additional forces, moments, etc. within SDOF. You can also combine SDOF with moving mesh.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   June 18, 2020, 11:28
Default
  #3
New Member
 
Join Date: Jun 2020
Posts: 8
Rep Power: 6
aCamb27 is on a distinguished road
Quote:
Originally Posted by vinerm View Post
You can add additional forces, moments, etc. within SDOF. You can also combine SDOF with moving mesh.
Dear Vinerm,

Thank you for your response. I've seen that I can specify external forces within SDOF, but haven't seen anywhere how to assign a constant velocity to the object. I would like the object to have a constant angular velocity about the z axis, but have variable y translation due to the hydrodynamic forces (see image below for an idea of what I hope to achieve).

Is there a function I could use to set this constant velocity, similar to CG_MOTION, but within the greater framework of SDOF?


SDOF_Deisred.jpg


Thanks!

Last edited by aCamb27; June 18, 2020 at 11:45. Reason: adding clarification
aCamb27 is offline   Reply With Quote

Old   June 18, 2020, 13:24
Default Sdof
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
You can only assign one dynamic object to each zone, so, either it has to be SDOF or CG_MOTION. However, you can combine it with mesh motion. Since the wings are rotating, in an SHM I suppose, you can assign mesh motion with rotation about z-axis. SDOF does not have any property for motion, however, dynamic thread is common structure for all dynamic objects. Therefore, you should be able to set omega_cg or v_cg within DEFINE_SDOF_PROPERTIES just like it is done in DEFINE_CG_MOTION. Its just that CG_MOTION provides you omega_cg as an argument while in SDOF, you have to fetch it from structure of dt.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   June 18, 2020, 13:55
Default
  #5
New Member
 
Join Date: Jun 2020
Posts: 8
Rep Power: 6
aCamb27 is on a distinguished road
Quote:
Originally Posted by vinerm View Post
You can only assign one dynamic object to each zone, so, either it has to be SDOF or CG_MOTION. However, you can combine it with mesh motion. Since the wings are rotating, in an SHM I suppose, you can assign mesh motion with rotation about z-axis. SDOF does not have any property for motion, however, dynamic thread is common structure for all dynamic objects. Therefore, you should be able to set omega_cg or v_cg within DEFINE_SDOF_PROPERTIES just like it is done in DEFINE_CG_MOTION. Its just that CG_MOTION provides you omega_cg as an argument while in SDOF, you have to fetch it from structure of dt.

Dear Vinerm,
Thank you for the help. In your last sentence, are you saying that there is a way for me to extract omega_cg from Ansys at each time step and then set it to be a certain value? I'm not very familiar with the dt structure, would you be able to clarify this a bit or point me to somewhere I could learn about it?
aCamb27 is offline   Reply With Quote

Old   June 18, 2020, 13:59
Default Dynamic Thread
  #6
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Yes, that's what I implied. dt is already provided by Fluent as argument of DEFINE_SDOF_PROPERTIES.

Look into dynamesh_tools.h available in src directory of Fluent installation. The first structure is for rigid bodies and the second one is generic dynamic thread structure. The rigid body structure is a member of dynamic thread. So, you can access rigid body structure from dt returned by Fluent and from that you can access omega_cg.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   June 18, 2020, 14:13
Default
  #7
New Member
 
Join Date: Jun 2020
Posts: 8
Rep Power: 6
aCamb27 is on a distinguished road
Quote:
Originally Posted by vinerm View Post
Yes, that's what I implied. dt is already provided by Fluent as argument of DEFINE_SDOF_PROPERTIES.

Look into dynamesh_tools.h available in src directory of Fluent installation. The first structure is for rigid bodies and the second one is generic dynamic thread structure. The rigid body structure is a member of dynamic thread. So, you can access rigid body structure from dt returned by Fluent and from that you can access omega_cg.

Thank you for the quick response! I'll look into this method now and see what I can do with it.
aCamb27 is offline   Reply With Quote

Old   June 23, 2020, 18:14
Default
  #8
New Member
 
Join Date: Jun 2020
Posts: 8
Rep Power: 6
aCamb27 is on a distinguished road
Quote:
Originally Posted by vinerm View Post
Yes, that's what I implied. dt is already provided by Fluent as argument of DEFINE_SDOF_PROPERTIES.

Look into dynamesh_tools.h available in src directory of Fluent installation. The first structure is for rigid bodies and the second one is generic dynamic thread structure. The rigid body structure is a member of dynamic thread. So, you can access rigid body structure from dt returned by Fluent and from that you can access omega_cg.
Dear Vinerm,

I was able to go through the src directory to access dynamesh_tools.h, and see the rigid bodies and generic dynamic thread structures mentioned. But, I'm still not able to have the UDF I write recognize omega_cg, even with #include "dynamesh_tools.h", which is where omega_cg[3] is located and defined in the src. I have included the UDF below.

Do you know if there is another file I have to #include, or a different function I need to use, to make sure Fluent connects the omega_cg[3] I write in my UDF to the one in dynamesh_tools.h?
Thank you for the help!


My UDF:


#include "udf.h"
#include "dynamesh_tools.h"

DEFINE_SDOF_PROPERTIES(ytranslationCWrotate, prop, dt, time, dtime)
{
prop[SDOF_MASS] = .001;
prop[SDOF_IZZ] = .1;
prop[SDOF_ZERO_TRANS_X] = TRUE;
prop[SDOF_ZERO_TRANS_Y] = FALSE;
prop[SDOF_ZERO_TRANS_Z] = TRUE;
prop[SDOF_ZERO_ROT_X] = TRUE;
prop[SDOF_ZERO_ROT_Y] = TRUE;
prop[SDOF_ZERO_ROT_Z] = FALSE;

real vely;
real omegareported;
real omega_cg[3]; /*without including real omega_cg[3] Fluent throws an “undefined object” error, and without the [3] it give a “subscript requires array“ error. */

if (time < 0.2)
{
omega_cg[2] = -3.9;
}

else
{
omega_cg[2] = 0.0;
}

vely = DT_VEL_CG(dt)[1];
omegareported = DT_OMEGA_CG(dt)[2];

Message("Time is %g and y velocity is %g and omega is %e and inputted omega is %g\n”, time, vely, omegareported, omega_cg[2]);
/*when I run a simulation, omega reported = 0.0 while omega_cg[2] = -3.9. */
}
aCamb27 is offline   Reply With Quote

Old   May 1, 2024, 07:32
Default
  #9
New Member
 
badShinchan
Join Date: Apr 2022
Posts: 3
Rep Power: 4
nahian_masud is on a distinguished road
Hi,

Could you solve the problem? I am trying something like this.
nahian_masud is offline   Reply With Quote

Reply

Tags
6-dof, fluent, udf


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
How to use "translation" in solidBodyMotionFunction in OpenFOAM rupesh_w OpenFOAM Running, Solving & CFD 5 August 16, 2016 05:27
External management of solid motion (using dynamicmesh) maxou1993 Main CFD Forum 0 July 28, 2015 12:37
Prescribed Patch Motion with sixDoFRigidBodyMotion Solver? petr.f. OpenFOAM Running, Solving & CFD 1 February 16, 2015 02:43
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
Prescribed mesh motion does not correspond to actual motion rbarrett CFX 8 June 30, 2011 14:22


All times are GMT -4. The time now is 03:37.