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

pressure profile behind projectile

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 13, 2012, 07:58
Default pressure profile behind projectile
  #1
New Member
 
Marta
Join Date: Mar 2012
Location: Warsaw
Posts: 4
Rep Power: 14
mcwat is on a distinguished road
Hi, I have a problem with my simulation. I have to get the proper conduct of the pressure for a missile. But I have no formula for the pressure, only the results of another simulation in *. txt. This pressure is exerted on the bottom of the projectile. I tried to get them through UDF'a, but I get the error:

cpp -I"c:\ANSYSI~1\v121\fluent\fluent12.1.4/src" -I"c:\ANSYSI~1\v121\fluent\fluent12.1.4/cortex/src" -I"c:\ANSYSI~1\v121\fluent\fluent12.1.4/client/src" -I"c:\ANSYSI~1\v121\fluent\fluent12.1.4/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "D:\ANSYS_p
ojekt\ETAP III\pbase.c.txt"
Error: D:\ANSYS_projekt\ETAP III\pbase.c.txt: line 16: parse error.
Error: D:\ANSYS_projekt\ETAP III\pbase.c.txt: line 24: parse error.

This is my UDF:

/************************************************** ********************
unsteady.c
UDF for specifying a transient parameters profile boundary condition
************************************************** *********************/
#include "udf.h"

DEFINE_PROFILE(unsteady_pressure, thread, position)
{
face_t f;
real t = CURRENT_TIME;

if (t <= 0.00084315)
{
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = -14 275 547 954 749 500 000 000.0*t*t*t*t*t*t + 43 436 065 414 501 600 000.0*t*t*t*t*t - 48 268 301 672 906 800.0*t*t*t*t + 23 694 384 396 288.0*t*t*t - 4 644 259 507.75*t*t + 469 948.4355*t + 36.8189;
}
end_f_loop(f, thread)
}
else
{
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 5 315 344 214 775 300.0*t*t*t*t*t - 78 873 823 528 841.0*t*t*t*t + 435 375 156 550.906*t*t*t - 1 075 741 334.8709*t*t + 1 046 010.0566*t - 39.2758;
}
end_f_loop(f, thread)
}}

(I am a layman in writing UDF: ()

I do not think it worked, but I have other ideas how to figure it out.
If anyone has any idea how to move, I will be grateful.

Waiting for information

Regards
mcwat is offline   Reply With Quote

Old   June 13, 2012, 13:34
Default
  #2
Senior Member
 
ghost82's Avatar
 
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26
ghost82 will become famous soon enough
Here is your udf:
Code:
#include "udf.h"

DEFINE_PROFILE(unsteady_pressure, thread, position)
{
  face_t f;
  real t = CURRENT_TIME;

  begin_f_loop(f, thread)
    {
    if (t <= 0.00084315)
          F_PROFILE(f, thread, position) = -14275547954749500000000.0*t*t*t*t*t*t+43436065414501600000.0*t*t*t*t*t-48268301672906800.0*t*t*t*t+23694384396288.0*t*t*t-4644259507.75*t*t+469948.4355*t+36.8189;
    else
          F_PROFILE(f, thread, position) = 5315344214775300.0*t*t*t*t*t-78873823528841.0*t*t*t*t+435375156550.906*t*t*t-1075741334.8709*t*t+1046010.0566*t-39.2758;
    }
  end_f_loop(f, thread)
}
This one compiles/interprets fine.
Copy and name it whatyouwant.c

Daniele
ghost82 is offline   Reply With Quote

Old   June 19, 2012, 05:38
Default
  #3
New Member
 
Marta
Join Date: Mar 2012
Location: Warsaw
Posts: 4
Rep Power: 14
mcwat is on a distinguished road
Thanks,

It looks fine. But I have another problem because projectile moves through the six DOF and this UDF is compiled. When I'm using the UDF with pressure profile behind the projectile then I have a message that "the six DOF can not be negative mass".

Does anyone know how to combine these two UDFs or has any idea how I can enter the desired pressure profile for a missile while taking advantage of its six DOF motion?

Waiting for information

Regards
mcwat is offline   Reply With Quote

Reply

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
"Pressure Inlet" Boundary Setup Wijaya FLUENT 15 May 18, 2016 11:08
Pressure Rise Error emueller CFX 0 May 5, 2009 12:08
Neumann pressure BC and velocity field Antech Main CFD Forum 0 April 25, 2006 03:15
creating a pressure profile Nial Horton FLUENT 2 February 18, 2004 06:26
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 16:00


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