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

Dynamic Mesh UDF for a Piston

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 9, 2021, 19:12
Default Dynamic Mesh UDF for a Piston
  #1
New Member
 
Mickael Perrin
Join Date: Dec 2020
Posts: 9
Rep Power: 5
mperrin is on a distinguished road
Dear users, hello !

I work on a simulation and request your help.


You can see my geometry in attachments. I am working on a thermal exchange between a solid zone (SOLID on the figure) and a fluid zone (FLUID1, 2 & 3). The flow is generated by a synchros move of boundaries (WALL A) and (WALL B).
The problem i encounter is generated by the interface between (SOLID) and (FLUID 2) area :
- when i assign and classic interface between the two zone, fluent returns me a SIGSEGV error
- when i change this interface for a wall (so there is no longer heat echant because the solid become totally insulated), the calcul run perfectly.


I suspect that i have to define additional zone but i am not sure. As SIGSEGV error generally comes in with UDF error, i request your help !


Here there is my code, the move i want to do is a simple sinusoidal signal.


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

double TimeStepSize = 0.01f;
double lenght = 0.045f;
double alpha = 0.56f;
double frequency = 0.5f;
double Vmax = 0.f;

static real velx = 0.0;
double Omega;

DEFINE_CG_MOTION(Piston, dt, vel, omega, time, dtime)
{
    NV_S(vel, =, 0.0);
    NV_S(omega, =, 0.0);

    Vmax = alpha * M_PI * frequency * lenght;
    Omega = 2 * M_PI * frequency;

    velx = (Vmax / Omega) * (cos(Omega * (time - TimeStepSize)) - cos(Omega * time)) / TimeStepSize;

    vel[0] = velx;
}
Do i have to define more zone in dynamich mesh setup like static zone ?
Do i have to make a static define motion UDF and assign it somewhere ?
Is there any error in my UDF ?


Thank you for reading and for your time !

Happy New Year !!
Attached Images
File Type: png Schema_png.PNG (174.4 KB, 13 views)
mperrin 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 for valve closing a pipe using dynamic mesh chem engineer Fluent UDF and Scheme Programming 2 May 13, 2017 09:39
UDF CG_MOTION rotation dynamic mesh Mads FLUENT 2 April 15, 2014 03:30
UDF for Dynamic Mesh vasava Fluent UDF and Scheme Programming 2 September 25, 2013 00:54
Dynamic Mesh UDF Parallelization sy_aloy FLUENT 0 February 13, 2006 12:14
Problem related with UDF for dynamic mesh Ryan FLUENT 6 April 29, 2004 09:29


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