CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF Dynamic Meshing for Rotation and Translation (https://www.cfd-online.com/Forums/fluent-udf/157635-udf-dynamic-meshing-rotation-translation.html)

Aidan100 August 3, 2015 23:57

UDF Dynamic Meshing for Rotation and Translation
 
Hey,

I'm learning how to use UDF's in order to set up a transient solver within fluent to test for dynamics involved with a morphing wing in between steady state solutions/morphing.

I am beginning with a simple 2D case and trying to learn how to rotate and translate basic objects in 2D (before progressing to 3D). I am trying to simulate the rotating cylinder to achieve lift and have attached the following UDF which should be able to define the rotational motion about the z-axis. (Source: http://projekter.aau.dk/projekter/fi...Enclosures.pdf)


/************************************************** *********************
udfexample.c
UDF for rotation of cylinder
************************************************** **********************/

# include "udf.h"
DEFINE_CG_MOTION ( rotation_udf_45 , dt , vel , omega , time , dtime )
{
real pi = 3.141592;
real omega_constant = 45* pi /180;
omega [2] = omega_constant ;
}




However after interpreting my UDF and applying it to the cylinder (zone 8) within the Dynamic Mesh menu bar it says:

"Warning: incorrect cg motion UDF rotation_udf_45 on zone 8 (assuming no motion). "


Indeed there is no motion occurring when the preview mesh motion is selected. How can I solve this problem?

Aidan100 August 5, 2015 06:50

Still very stuck, I'm sure there's a simple solution!
 
I've been reading up and it seems a common mistake for UFD beginners like myself. What I have read is:

You need to 'compile' a define_CG UFD before being able making it usable within dynamic mesher.

Although I can build/compile the above UDF, another error appears saying the libudf is unable to be used for parallel use on Windows 64x. So I tried reopening my setup process in fluent using a 'serial' instead and I get the following error:

Error: The UDF library you are trying to load (C:\Transient Analysis_files\dp0\FFF\Fluent\libudf) is not compiled for 2ddp on the current platform (win64).

Thankyou kind CFDonline people in Advance!
Aidan

Far August 16, 2015 23:39

This problem arises due to problems in installation of Visual studio. In addition to that you should have correct combination of Fluent version and Visual Studio version.


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