
[Sponsors] 
May 28, 2014, 10:47 
marker_inlet BC calculations

#1 
New Member
Giulio
Join Date: Apr 2014
Location: Milano
Posts: 15
Rep Power: 4 
Hi everybody, I'm a fresh user of SU2 and I'm just trying to figure out how it works, so I got a couple of basic questions.
I'm playing with boundary conditions and looking at config file for the channel with bump tutorial, I can see that total pressure and total temperature must be specified in order to obtain the desired mach speed. I suppose that those values are calculated using isoentropic flow formula once the desired mach number is given, but I'm not sure where to specify the static values (of pressure and temp). Seems to me that this is done by imposing freestream parameters, is this correct? Also, always for this tutorial, I want to run a supersonic simulation and I noticed that there is a bc named MARKER_SUPERSONIC_INLET. So here's my question: is somehow MARKER_INLET also good at specify supersonic bc, or I must use only the MARKER_SUPERSONIC_INLET? and in what src file can I find how these routines are defined? Thank you very much for your time Giulio
__________________
Giulio Gori Phd candidate, Politecnico di Milano 

June 5, 2014, 15:27 

#2 
Super Moderator
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 269
Rep Power: 6 
Hi Giulio,
Thanks for the questions, and I'm glad to hear that you are giving SU2 a try! Indeed, we have typical characteristicbased inlet and outlet boundary conditions, which are suitable for internal flow calculations. The inlet condition can accept either total conditions (Ptot, Ttot) and a flow direction or mass flow (density and velocity vector). This for subsonic flow where information travels upstream and not all variables can be specified at the boundaries (see the CFD text by Hirsch for good discussion). In addition, internal flows will also usually depend on the outlet BC, where static pressure is typically imposed for subsonic flows. If the flow becomes supersonic in the channel, then no variables at the outlet are necessary, as all characteristics are leaving the domain at the outlet (i.e., no boundary condition is required). However, in the supersonic inlet case, all of the characteristics are entering the domain, so all of the flow variables can be prescribed. Therefore, in the supersonic inlet BC, we allow for the imposition of all primitive variables. You can find the routines for these BCs in the solver_direct_mean.cpp file within the SU2/SU2_CFD/src/ directory. In particular, check out the following: void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) void CEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) All the best, Tom 

June 6, 2014, 04:33 

#3 
New Member
Giulio
Join Date: Apr 2014
Location: Milano
Posts: 15
Rep Power: 4 
Thanks for your answer Tom,
this last week I got into the code and found those routines. I noticed that the method BC_Outlet is capable of understanding if the outflow is super/subsonic. This doesn't happen for the BC_inlet, so I guess that this BC must be used only when facing subsonic inlet, does it? i.e. this method is capable of imposing only the d + 2  1 quantities of the subsonic case, but not all of them if the inlet is supersonic Indeed I tried to run bump channel tutorial imposing total values corresponding to supersonic flow (Mach=2, based on freestream static values) and I get a very nonphysical result. Using BC_supersonic_inlet gives obviously good results So if everything is as I suppose (ie BC_inlet work only for subsonic case) my doubt arose only because I expected something called BC_subsonic_inlet. Also, I gave a deeper look at the code and I was able to find almost everything I needed, but I couldn't identify the lines where the jacobian matrix are calculated, can you please tell me in which file this is done? regards Giulio
__________________
Giulio Gori Phd candidate, Politecnico di Milano Last edited by LaSerpe; June 6, 2014 at 08:59. 

June 24, 2014, 16:10 

#4 
Super Moderator
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 269
Rep Power: 6 
Indeed, while you can create a single inlet BC for both supersonic and subsonic, we have chosen a separate implementation for clarity. It is quite a bit simpler to combine them for the outlet condition (there is either a single upstream characteristic for subsonic, or none for subsonic, which makes the adjustment straightforward).
The Jacobian matrices for the various terms (convective fluxes, viscous fluxes, and source terms) will be found in their respective numerics classes. For instance, you can find the Jacobian for the JST scheme in the routine void CCentJST_Flow::ComputeResidual(double *val_residual, double **val_Jacobian_i, double **val_Jacobian_j, CConfig *config) within numerics_direct_mean.cpp. Cheers, T 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Cluster ID's not contiguous in computenodes domain. ???  Shogan  FLUENT  1  May 28, 2014 15:03 
Sedimentation and the full NS equations: too slow calculations  TTY  Main CFD Forum  5  October 4, 2013 16:22 
Using a custom algorithm for cell center calculations  Zvex  OpenFOAM Programming & Development  7  June 30, 2013 05:01 
2D Vs 3D VOF Fluent calculations  sachinthakre  FLUENT  0  February 5, 2013 12:35 
2D Vs 3D VOF calculations  sachinthakre  Main CFD Forum  0  February 5, 2013 08:35 