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

UDF at pressure inlet[pleas help me!!]

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2011, 11:55
Default UDF at pressure inlet[pleas help me!!]
  #1
New Member
 
denny lee
Join Date: Feb 2011
Posts: 7
Rep Power: 15
kokoory is on a distinguished road
Hello All,

I would like to increase pressure and temperature at pressure inlet boundary.

As like this,

1~1000 iteration : pressure - 101325 pa, temperature - 250K
1001~2000 iteration : pressure - 101325* 2 , temperature - 500K

How do i do complete my goal?

I could compile and hook, but it is all!!
I try to code UDF to find a solution by myself. but it does not work!!
kokoory is offline   Reply With Quote

Old   February 2, 2011, 21:09
Default
  #2
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16
ComputerGuy is on a distinguished road
Kokoory,

A few things:
1) Are you really trying to change boundary conditions on a per-iteration basis? Is this a steady state or a transient problem? If you're actually trying to do a steady state simulation and you want to change inlet conditions after a specified number of iterations, don't. Simply put your boundary conditions to what you want them to be at t=infinity and let the simulation solve.
2) If you're trying to solve a transient case, and by iterations you mean "time steps" or "simulation time, in seconds" have a look at this Time dependent flows in Fluent with UDFs
3) Finally, more of a numerics issue...The changes you're imposing are fairly dramatic over what, presumably, will be a short period of time. This often causes convergence difficulties, and rightfully so -- the physics you're trying to impose are almost non-physical. In one timestep (very short) the pressure and temperature across an entire face double. Typically, one would impose a slightly more gentle ramp than a step change, and take fractional timesteps in the "in between" part to allow the solver to get to a more stable answer.

I hope this helps!

ComputerGuy
ComputerGuy is offline   Reply With Quote

Old   February 3, 2011, 08:40
Default
  #3
New Member
 
denny lee
Join Date: Feb 2011
Posts: 7
Rep Power: 15
kokoory is on a distinguished road
Thanks, ComputerGuy.

I refer your opinion for the model.

So, I use the below code for pressure and temperature.
Code:
#include "udf.h"
DEFINE_PROFILE(temperature_magnitude, t, i)
{
real temperature_mag;
real current_time;
face_t f;
current_time = CURRENT_TIME;
temperature_mag=300+220*current_time;
begin_f_loop(f,t)
{
F_PROFILE(f,t,i) = temperature_mag;
}
end_f_loop(f,t)
}
Code:
#include "udf.h"
DEFINE_PROFILE(pressure_magnitude, t, i)
{
real pressure_mag;
real the_current_time;
face_t f;
the_current_time = CURRENT_TIME;
pressure_mag=101325*the_current_time;
begin_f_loop(f,t)
{
F_PROFILE(f,t,i) = pressure_mag;
}
end_f_loop(f,t)
}
after that, I interpreted_ and compiled and hooked to pressure_inlet B.C.
For pressure code, I hook to Gauge total pressure and for temperaturee code, to temperature.

Next, I set the time step size = 0.001 and number of time steps = 10000
and Max iterations per step = 1. Because I would like to increase the pressure at 1013250 and the temperature at 2500K after all calculating.

Is it OK what I thought to be?
kokoory is offline   Reply With Quote

Reply

Tags
inlet, pressure, temperature profile, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 to adjust pressure outlet a.lynchy FLUENT 4 February 15, 2021 00:50
Pressure BC for combustion chamber Giuki FLUENT 1 July 19, 2011 11:35
Modifying Pressure swirl atomizer model by UDF jeff_F FLUENT 0 May 22, 2010 09:22
calculation average pressure in a plane with UDF Vitalij FLUENT 1 April 10, 2007 03:39
Neumann pressure BC and velocity field Antech Main CFD Forum 0 April 25, 2006 02:15


All times are GMT -4. The time now is 18:51.