|
[Sponsors] |
Simulation of ball-valve opening w.r.t to varying inlet pressure |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
wasim
Join Date: Aug 2015
Posts: 9
Rep Power: 11 ![]() |
Hello everyone...
Here i am posting a problem related to simulation of inlet pressure variation at the inlet of valve. Imagine there is valve in pipeline located far away distance from source or tank. Now at t=0 valve is opened and suppose at steady state pressure drop inside the pipeline is Del_P=2 bar and steady pressure drop in downstream circuit let say is one bar. Now when i closed the valve pressure at the inlet of valve w.r.t to source pressure will vary from 2-0 bar. when i am simulate this situation using UDF by monitoring mass flow rate using FLUX_F function and converting this flow rate using Delta_P =K*m^2; where k is constant for pipeline and is given by 8fl/PI^2*roh*d^5 and altering inlet pressure using PROFILE function i am not getting desired output....can anyone guide and tell some other method to alter inlet pressure at every time steps.... Actually in my simulation flow is occurring in steady state and i am closing the valve as the valve start closing flow through the valve starts decreasing and pressure at the inlet of valve should decrease as in steady state pressure drop is maximum and inlet pressure should be that of tank/source pressure minus delta_p. But when i am simulating this using UDF pressure at t=0 i am getting that of source/tank pressure and bcoz of high inlet pressure flow through the valve start increasing as shown in attach figures and flow instead of decreasing it start increasing.......how to resolve this problem.......can any one guide... Regards Wasim |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
wasim
Join Date: Aug 2015
Posts: 9
Rep Power: 11 ![]() |
Following UDF program i am using to modify the inlet pressure......
#include "udf.h" FILE *fp; real flow_tot; DEFINE_EXECUTE_AT_END(pressure) { Domain *d; float flow; cell_t c; Thread *t; face_t f; d = Get_Domain(1); t= Lookup_Thread(d, 12); begin_f_loop(f,t) { flow+=F_FLUX(f,t); } end_f_loop(f,t) flow_tot =flow; flow=0.; } DEFINE_PROFILE(inlet_pressure, thread, position) { face_t f; float P_i=903063;/* 199625Pa steady state pressure drop in feed circuit*/ real t= CURRENT_TIME;/* steady state inlet pressure 703438Pa*/ /*float flow_t=0;*/ float Del_P=0; fp = fopen("output.txt","a"); fprintf(fp,"MASS Flow Rate: %f kg/s \n",flow_tot); fclose(fp); Del_P=(0.79215*flow_tot*flow_tot); begin_f_loop(f, thread) { F_PROFILE(f, thread, position)=P_i-Del_P; } end_f_loop(f, thread) } |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure drop in pipe flow with Large Eddy Simulation | xerox | FLUENT | 1 | October 16, 2019 08:55 |
sonicFoam - pressure driven pipe: flow continuity violation and waveTransmissive BC | Endel | OpenFOAM Running, Solving & CFD | 3 | September 11, 2014 16:29 |
"Closing" a pressure inlet via UDF? | dave88 | Fluent UDF and Scheme Programming | 0 | August 27, 2013 18:14 |
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) | HB &DS | CFX | 0 | January 9, 2000 13:19 |
Hydrostatic pressure in 2-phase flow modeling (long) | DS & HB | Main CFD Forum | 0 | January 8, 2000 15:00 |