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

Porosity based solid UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 6, 2019, 09:52
Default Porosity based solid UDF
  #1
New Member
 
Robin
Join Date: Sep 2019
Posts: 4
Rep Power: 6
IRobin is on a distinguished road
Hi all,

First of all, excuse me if I make some mistakes concerning the thread/forum rules as this is my first ever created thread (mainly because I am unable to find any useful answer to my problem ).

Given the problem, I want to try and simulate the open/closing of a door (which will be used in a large simulation eventually) in ANSYS Fluent. There are (which I am aware of) mainly two ways of doing this. The first option is to use a dynamic mesh in which a UDF is used describing the required translation/rotation. This I am able to (partially) do, however I notice that I need an extremely small time step as it is transient.
Hence I 'discovered' a second option used in a research ('CFD SIMULATION OF AIRFLOW DUE TO DOOR MOTION USING A
MOMENTUM SOURCE METHOD.'). In this study, it is explained that a door/solid can be modeled by a UDF which specifies a porosity of 0% at the location of the door. Therefore creating a somewhat artificial solid (velocity is zero at this location). However, after trying to implement it in Fluent, I came to the conclusion that it is (most likely) impossible to have a porosity equal to 0 as it gives the 'floating point' error. I should note, that I first simplified the problem to steady state, in which I (try to) simulate the flow of a fluid around a solid square using this 'artificial' technique (afterwards I wanted to make this solid move by means of a path defined in the UDF, becoming transient).

The UDF I use is given as:

#include "udf.h"

DEFINE_PROFILE(POR_solid,thread,i) { cell_t cell;

real x[ND_ND];

begin_c_loop(cell,thread)
{
if (x[1] <= 0.2 && x[1] > -0.2 && x[0] >= -0.2 && x[0] < 0.2) */Square location */
{
F_PROFILE(cell,thread,i) = 0.0;
}
else
{
F_PROFILE(cell,thread,i) = 1.0;
}
} end_c_loop(cell,thread) }

My question is therefore, is it possible to still construct a UDF which uses this method without getting the 'floating point' error (note that upon changing the zero value to an arbitrary nonzero value, fluent is able to solve the problem). Again, Sorry if I posted this in the wrong thread .

Some extra info:
I interpret the UDF rather than compiling. Next, I implement it by going to (in fluent) Cell zone Conditions -> edit -> porous zone -> X direction-1 vector

Robin
IRobin is offline   Reply With Quote

Old   September 23, 2019, 03:03
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you may try to use very small timesteps to reach the convergence

also you should think about inlets and outlets in your model

best regards
AlexanderZ is offline   Reply With Quote

Reply

Tags
porous media, 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
porosity udf walied123 Fluent UDF and Scheme Programming 4 February 17, 2015 14:34
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 07:26
UDF : heat source located in a solid cdiako Fluent UDF and Scheme Programming 7 October 8, 2013 18:56
help with UDF for contact angle based on contact line velocity gandesk Fluent UDF and Scheme Programming 14 October 29, 2012 13:58
porosity in UDF Jin Yan FLUENT 4 December 1, 2009 09:27


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