|
[Sponsors] |
Rotating detonation simulation覧boundary setting |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: May 2022
Posts: 2
Rep Power: 0 ![]() |
Dear friends,
I am doing 3D rotating detonation simulation,the difficulty is the inlet boundary depends on different pressure: when pw > p0, the reactants can not be injected into the chamber. when p0 >pw > pcr, the inlet flow is not choked,completes subsonic injection. when pw < pcr < p0,it is a sonic injection . I hava used groovyBC of swak4Foam,but the results is bad. Could anyone give me some advices and help? Thanks very much! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
can
Join Date: Aug 2023
Posts: 5
Rep Power: 3 ![]() |
#include "udf.h"
DEFINE_PROFILE(my_pressure_inlet_mf,thread,i) { face_t f; cell_t c0; Thread *tc0; real p; real po; real pcr; real To; real gamma; real R; R = 368.9; // J/kg k gamma = 1.29; po = 1000000; pcr = po * pow( (2/(gamma+1)), (gamma/(gamma-1)) ); To = 300; begin_f_loop(f,thread) { c0 = F_C0(f,thread); tc0 = THREAD_T0(thread); p = C_P(c0,tc0); //pressure near wall if(p >= po) // where boundary is gonna be set as wall { F_PROFILE(f,thread,i) = 0.0000001; // no source term case F_U(f,thread)=0; F_V(f,thread)=0; F_W(f,thread)=0; } else if(p > pcr && p < po) { F_PROFILE(f,thread,i) = p; F_U(f,thread) = sqrt( (2*gamma/(gamma-1)) *R*To * (1 - pow(p/po, (gamma-1)/gamma)) ); F_T(f,thread) = To*pow( p/po, (gamma-1)/gamma); } else if(p <= pcr) { F_PROFILE(f,thread,i) = pcr; F_U(f,thread) = sqrt( (2*gamma/(gamma-1)) *R*To * (1 - pow(p/po, (gamma-1)/gamma)) ); F_T(f,thread) = To*pow( p/po, (gamma-1)/gamma) ; } } end_f_loop(f,thread) } You can change parameters. This is an udf for fluent btw. |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Inertial and non-Inertial Reference Frame for Rotating Flows | emreozmen | Main CFD Forum | 0 | January 30, 2017 04:08 |
Rotating motion simulation in fluent | yusuf.5ayat | ANSYS | 0 | January 10, 2017 06:18 |
using chemkin | JMDag2004 | OpenFOAM Pre-Processing | 2 | March 8, 2016 22:38 |
[snappyHexMesh] determining displacement for added points | CFDnewbie147 | OpenFOAM Meshing & Mesh Conversion | 1 | October 22, 2013 09:53 |
Residual level setting of Fluent | lhlh | ANSYS | 2 | November 17, 2012 21:35 |