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

Trouble: Sandia UV UDF on FLUENT 12.0.16

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 26, 2011, 15:52
Default Microsoft windows .net framework v2.0 should be work
  #21
New Member
 
limin
Join Date: May 2009
Posts: 21
Rep Power: 17
zhang.limin is on a distinguished road
Quote:
Originally Posted by lauripar View Post
I checked my SDK and it is v7.1. I have windows 7 and 64 bit system, could some my problems be related to that?
Microsoft windows .net framework v2.0 should be work
zhang.limin is offline   Reply With Quote

Old   March 28, 2011, 21:54
Default Injection code doubts
  #22
New Member
 
Join Date: Feb 2011
Posts: 16
Rep Power: 15
JSoares is on a distinguished road
Hello everyone

Since the source (sandia uv) is the same, i´m wondering if anyone can explain to me the injection code?

I was able to compile the udf whith sucess but i´m with doubts on creating the injection code file, because i don´t understand the parameters.

My case is 2D what means:

! plane: desired plane for injection points (xy, xz, yz) - My case is 2D and the plane of the flow is xy, shold i select xz. Or this could be a problem?

i don´t know what this coordinates are?

! coord: axial coordinate of the plane (m)
! coord1: 1st coordinate of injection-plane centroid (m)
! coord2: 2nd coordinate of injection-plane centroid (m)

Thank you and if anyone needs help with the udf for fluent 12.1 contact me
JSoares is offline   Reply With Quote

Old   March 28, 2011, 22:00
Default Injectionfile
  #23
New Member
 
limin
Join Date: May 2009
Posts: 21
Rep Power: 17
zhang.limin is on a distinguished road
x y z . u v w, temperature, diameter, density, id
zhang.limin is offline   Reply With Quote

Old   March 29, 2011, 17:11
Default display udf
  #24
Member
 
rose
Join Date: Dec 2010
Posts: 30
Rep Power: 15
rubis is on a distinguished road
hi all ,
i have this udf but i can'nt display it in fluent ;

#include <udf.h>
DEFINE_PROPERTY (dyn_surf_tension, cell, thread)
{
real dst;
real t=CURRENT_TIME;
dst=141121*pow(t,5) - 38978*pow(t,4) + 3817.5*pow(t,3) - 148.84*pow(t,2) +
1.3033*pow(t,1) + 0.071;
return dst;

thank you
rubis is offline   Reply With Quote

Old   April 20, 2011, 09:18
Default
  #25
New Member
 
Join Date: Feb 2011
Posts: 16
Rep Power: 15
JSoares is on a distinguished road
Hello everyone

Just two questions: does it matters the material used for particles? And should i select the uv interaction on dpm model?

Or does sandia files regards this problem.

Real thanks
JSoares is offline   Reply With Quote

Old   April 20, 2011, 10:03
Default massless
  #26
New Member
 
limin
Join Date: May 2009
Posts: 21
Rep Power: 17
zhang.limin is on a distinguished road
it is massless particle type . from file injection.
zhang.limin is offline   Reply With Quote

Old   April 20, 2011, 10:04
Default
  #27
New Member
 
limin
Join Date: May 2009
Posts: 21
Rep Power: 17
zhang.limin is on a distinguished road
just particle tracking in dpm
zhang.limin is offline   Reply With Quote

Old   April 20, 2011, 10:14
Default
  #28
New Member
 
Join Date: Feb 2011
Posts: 16
Rep Power: 15
JSoares is on a distinguished road
Thanks. I´m not using the injections from the file but a group injection cause i don´t want a circular injection, but the principle is the same.

Another question: anyone using this tipe of simulation on transient state? I´m with doubts if there is any equation to determine the step length factor?

real thanks
JSoares is offline   Reply With Quote

Old   April 20, 2011, 10:19
Default
  #29
New Member
 
limin
Join Date: May 2009
Posts: 21
Rep Power: 17
zhang.limin is on a distinguished road
STEP LENGTH FACTOR is as better as smaller depend your mesh size, usually the particle travel one mesh one step, and if you can manage 10+ step in one mesh cell should be much better
zhang.limin is offline   Reply With Quote

Old   April 20, 2011, 11:53
Default
  #30
New Member
 
Join Date: Feb 2011
Posts: 16
Rep Power: 15
JSoares is on a distinguished road
Thanks zhang.limin

I didnt quite understand the last answer. I´ve a structured mesh but the size of each cell is differente since i use a progression nearby the cylinder (UV lamp) because of wall behaviour.

My domain is 1.08 meters in the flow direction, and i have 270 cells in the same direction. But the smallest cell near the wall (cylinder) have aproximated 1.54e-4 meters of length.

In this case what is the max STEP LENGTH FACTOR or even the specified length scale that i should use in order to a particle travel one cell in one timestep.

One more time real thanks
JSoares is offline   Reply With Quote

Old   April 27, 2011, 13:46
Default
  #31
New Member
 
Join Date: Feb 2011
Posts: 16
Rep Power: 15
JSoares is on a distinguished road
Hello everyone

I´ve one question: How do you define red constants A and B? My problem is that i only have acess at this time to numerical values(fluent).

I´m using a model used for numerical solutions where:

RED=1/k*ln((1/number of particl.)*sum(exp(-k*Di))
Ni/No=exp(-k*Di)

Where Di is the dose of each particle and k is a coefficient of the first order of inactivation of a microbe.

Anyone have other solutions or sugestions?

Thanks
JSoares is offline   Reply With Quote

Old   May 25, 2011, 12:15
Default it´s possible to use this in unsteady dpm tracking?
  #32
New Member
 
Join Date: Feb 2011
Posts: 16
Rep Power: 15
JSoares is on a distinguished road
Hello everyone.

Regarding Sandia UDf, it´s possible to use this in unsteady dpm tracking?
I have a problem with this UDF using unsteady particle tracking, because the scalar is updated to a new value and will not retain the last. I want to measure the total U.V. dose in each particle on the output boundary, but I only get the last value of UV dose, and not the total.
I´m a beginner user to UDF but there is any way to change this, to retain the values of UV dose each dpm time step?

/************************************************** *********************/
/* UDF for computing the UV dosage along a particle trajectory */
/************************************************** *********************/

#include "udf.h"
#include "dpm.h"
#include "sg_disco.h"

#define fileuv "output.dpm"
#define C_DO(c,t)C_STORAGE_R_XV(c,t,SV_DO_IRRAD,0)

static real uv_intensity_0;
static real x0, y00, z0;

FILE *fuv;

DEFINE_DPM_SCALAR_UPDATE(uv_dosage, cell, thread, initialize, p)
{
cphase_state_t *c = &(p->cphase);
if (initialize)
{
p->user[0] = 0.;
uv_intensity_0 = C_DO(cell,thread);
x0=p->state.pos[0];
y00=p->state.pos[1];
z0=p->state.pos[2];
}

else
{
p->user[0] += P_DT(p) * .5 * (uv_intensity_0 + C_DO(cell,thread));
uv_intensity_0 = C_DO(cell,thread);
}
}

DEFINE_DPM_OUTPUT(uv_output, header, fp, p, thread, plane)
{

char name[100];


if (header)
{
fuv = fopen(fileuv,"w");
if (NNULLP(thread))
{
fprintf(fuv,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,14);
}
else
fprintf(fuv,"(%s %d)\n",plane->sort_file_name,14);
fprintf(fuv,"(%10s %10s %10s %10s %10s %10s %10s"
" %10s %10s %10s %10s %10s %10s %10s %s)\n",
"X0","Y0","Z0",
"X","Y","Z","U","V","W","diameter","T","mass-flow",
"time","UV-Dosage","name");
fclose(fuv);
}
else
{
fuv = fopen(fileuv,"a");
sprintf(name,"%s:%d",p->injection->name,p->part_id);
fprintf(fuv,
"((%10.6g %10.6g %10.6g %10.6g %10.6g %10.6g "
"%10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g) %s)\n",
x0,y00,z0,
p->state.pos[0], p->state.pos[1], p->state.pos[2],
p->state.V[0], p->state.V[1], p->state.V[2],
p->state.diam, p->state.temp, p->flow_rate, p->state.time,
p->user[0], name);
fclose(fuv);
}
}
JSoares is offline   Reply With Quote

Reply

Tags
fluent, help me, 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
problem with loading udf in fluent 6.3 James Fluent UDF and Scheme Programming 6 January 22, 2015 06:51
problem loading UDF in parallel fluent Tim FLUENT 12 July 12, 2008 13:59
fluent UDF external library lapack problem Rick FLUENT 0 May 7, 2008 11:16
UDF of Zimont model in fluent Z Main CFD Forum 0 February 17, 2005 04:07
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 11:44


All times are GMT -4. The time now is 16:04.