|
[Sponsors] |
SU2 v6.0: Impose a boundary layer profile at the inlet in parallel |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 27, 2018, 23:24 |
SU2 v6.0: Impose a boundary layer profile at the inlet in parallel
|
#1 |
New Member
Akshay Deshpande
Join Date: Sep 2014
Posts: 19
Rep Power: 11 |
Hi all,
I am trying to impose a boundary layer profile in a Mach 2.9 flow at the inlet of a flat plate in SU2 v6.0. For this purpose, I have created a function in solver_structure.cpp, void CSolver::Read_Inlet_Profile(CGeometry *geometry, CConfig *config, unsigned short val_marker) The function reads in a file containing the velocity and density values to data structures initialized in solver_structure.hpp. I allocate memory to the data structure in the same function as follows, InletVelocity = new su2double[geometry->nVertex[val_marker]] InletDensity = new su2double[geometry->nVertex[val_marker]] I loop over the vertices of that boundary marker and read the data from a text file using getline and istringstream. I call Read_Inlet_Profile in solver_direct_mean.cpp in the function, void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker). To access the data structures, I have created accessing functions GetInletVelocity and GetInletDensity, which I call in the loop, for (iVertex = 0; iVertex < geometry->nVertex[val_marker]; iVertex++), and appropriately modify the primitive variables in the array V_inlet. This approach works when I run the code serially, but breaks down when I try to run on multiple processors. To try a parallel approach, I tried to follow the function, void CSolver::Read_SU2_Restart_ASCII(CGeometry *geometry, CConfig *config, string val_filename) in solver_structure.cpp and have all the ranks read in the file simultaneously. I believe my problem might be in assigning the velocity/density values to the right vertex after ParMETIS does grid partitioning. I have also tried SU2_MPI::Bcast by having only the root process read the file, but this approach fails too as the number of vertices each in processor are not equal. I would appreciate any suggestions regarding this issue. Thanks, Akshay |
|
March 18, 2018, 21:27 |
|
#2 |
Super Moderator
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15 |
Hi Akshay, sorry for the late reply,
Maybe you should take a look at COutput::SetCp_InverseDesign(CSolver *solver_container, CGeometry *geometry, CConfig *config, unsigned long iExtIter) {} In that subroutine SU2 reads and storages a target Cp distribution on a surface... it maybe be a comparable problem. By the way, glad you are developing SU2... www.su2devsociety.org maybe be interesting for you. Best, Francisco |
|
March 19, 2018, 09:13 |
|
#3 |
New Member
Akshay Deshpande
Join Date: Sep 2014
Posts: 19
Rep Power: 11 |
Thanks! I'll take a look at it.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Out File does not show Imbalance in % | Mmaragann | CFX | 5 | January 20, 2017 10:20 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 01:27 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 17:11 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 17:44 |
Boundary Layer Across the Inlet of Nozzle | HLYBoy | FLUENT | 3 | December 2, 2011 22:43 |