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

sinus translation of 2D zone

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 24, 2018, 16:41
Default sinus translation of 2D zone
  #1
New Member
 
Casey
Join Date: Apr 2018
Posts: 4
Rep Power: 8
Fuergrissa is on a distinguished road
I think I have a very simple request, I would like a particular edge in my 2D simulation to oscillate back and forth along the X axis with a specified magnitude and frequency. I made the edge it's own zone and specified rigid body motion and set the adjacent edges to deform.

I'm trying to accomplish this with the 6DOF solver since i've found more examples to look off, but it seems like a UDF specifying the motion or a profile would be easier and more simple then specifying a periodic force and letting the 6DOF solver determine the motion. Any advice for any of these solutions would be very much appreciated. Currently I'm trying to adapt the script shown in the piston and reed valve tutorial (https://youtu.be/BuA6uI2tWuA)

Code:
#include "udf.h"
#include "math.h"

DEFINE_SDOF_PROPERTIES(fin1_6dof, prop, dt, time, dtime)
{
prop[SDOF_MASS] = 0.01;
prop[SDOF_IZZ] = 1e-4;
prop[SDOF_ZERO_TRANS_X] = False;
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] = TRUE;
prop[SDOF_LOAD_F_X] = .001* sin( 3800 * time );
Message("\n 2d : Updated 6DOF properties %e,Fx,%e\n", prop[SDOF_LOAD_F_X], prop[SDOF_MASS]);
}
If I get this to work I will have to experiment with the values to get the displacement I'm looking for.

I'm not well experienced in fluent and especially in C programming so I greatly appreciate as much detail in your response as you are able to give.
Fuergrissa is offline   Reply With Quote

 


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
[Commercial meshers] Mesh conversion problem (fluent3DMeshToFoam) Aadhavan OpenFOAM Meshing & Mesh Conversion 2 March 8, 2018 01:47
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 10:52
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51
Problem in IMPORT of ICEM input file in FLUENT csvirume FLUENT 2 September 9, 2009 01:08


All times are GMT -4. The time now is 10:36.