|
[Sponsors] |
January 26, 2013, 18:57 |
Custom BCs
|
#1 |
New Member
Join Date: Jan 2013
Posts: 12
Rep Power: 13 |
How is the 'custom' boundary condition used in SU2?
|
|
January 30, 2013, 11:14 |
|
#2 |
New Member
Amrita Lonkar
Join Date: Nov 2012
Posts: 14
Rep Power: 14 |
The purpose of the custom boundary routine is to allow addition of new boundary conditions with relative ease. As you might have noticed, there is already some code written in the "BC_Custom" method in the file solution_direct_mean.cpp. You can get rid of all the code from that method (keeping the arguments in the function call) and implement your boundary conditions instead.
To use this new boundary condition, you will have to specify the option "MARKER_CUSTOM" in the configuration file, wherein this marker should include all the boundaries on which you want to specify this condition. (example, MARKER_CUSTOM= ( boundary1, boundary2)) |
|
February 11, 2013, 12:00 |
|
#3 |
New Member
Join Date: Jan 2013
Posts: 12
Rep Power: 13 |
I've modified the code section you recommended and tried a simple test case for a 3D grid, but it doesn't seem to work when I try to view the output in either Paraview (opens with errors about the ascii format) or Tecplot (it doesn't even open in Tecplot).
I've attached a copy of the method that I modified. Are there errors in how I'm setting the BC? |
|
February 12, 2013, 19:24 |
|
#4 | |
Senior Member
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16 |
Quote:
http://www.cfd-online.com/Forums/su2...-flow-vtk.html You can try to open the flow.vtk file with a text editor and search for MACH to see if the number is overflowed (Mach number is divided by zero sound speed). I don't have Tecplot, but I read that part of the output code, i think there is a bug for TET element. The connection is wrong. |
||
February 12, 2013, 22:10 |
|
#5 |
New Member
Join Date: Jan 2013
Posts: 12
Rep Power: 13 |
Thanks, but I figured out what the problem was. Actually, there was no problem. The code works just fine, but I forgot that my env variable was pointing to the wrong SU2 executable.
Stupid mistake on my part! |
|
February 28, 2013, 22:36 |
|
#6 |
New Member
Join Date: Jan 2013
Posts: 12
Rep Power: 13 |
I'm trying to set a boundary condition that is a function of x,y,z, and that remains constant. Is this the correct approach:
Code:
/*--- Load up the solution vector ---*/ Solution_i[0] = P; Solution_i[1] = rho_u; Solution_i[2] = rho_v; if(nDim == 3) Solution_i[3] = rho_w; /*--- Set Solution and zero Residual ---*/ node[iPoint]->SetSolution_Old(Solution_i); node[iPoint]->SetSolution(Solution_i); node[iPoint]->Set_ResConv_Zero(); node[iPoint]->Set_ResSour_Zero(); node[iPoint]->Set_ResVisc_Zero(); node[iPoint]->SetRes_TruncErrorZero(); /*--- Change rows of the Jacobian (includes 1 in the diagonal) ---*/ if (implicit) for (iVar = 0; iVar < nVar; iVar++) { total_index = iPoint*nVar+iVar; Jacobian.DeleteValsRowi(total_index); } |
|
March 7, 2013, 07:05 |
Implementing custom BC
|
#7 |
Member
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 13 |
Hello
I am trying to implement 'Rotating Wall BC' velocity boundary condition in SU2. I need to define a point where the axis of rotation passes and the rotational velocities in the 3 directions. For that I need to define new input variables in the 'MARKER_CUSTOM' tag. So, can anyone suggest where do I need to define these new input variables ? (I assume they need to be defined in /SU2v2.0/trunk/Common/src/config_structure.cpp). Thanks Anant |
|
March 12, 2013, 02:50 |
Doubt in implementing custon BC
|
#8 |
Member
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 13 |
Hello
I am trying to implement rotating wall BC in the SU2, but I am having some problem in doing that. I need to define my Custom BC something like AddMarkerRotatingWall("MARKER_ROT_WALL", nMarker_Rot_Wall, Marker_Rot_Wall, Rotation_X, Rotation_Y, Rotation_Z, Omega_X, Omega_Y, Omega_Z); The parameters (rotating axis location and rotating velocities) are to be taken as input. They may be different for different walls. What are the steps that I need to do to define these parameters ? Thanks Anant |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to calculate pressure forces using custom field functions? | tsagaro | FLUENT | 7 | June 23, 2017 16:45 |
Dealing with BC's in OF 1.6 | vkrastev | OpenFOAM Running, Solving & CFD | 5 | September 4, 2012 12:58 |
Understanding Code behind BCs | Linse | OpenFOAM Programming & Development | 8 | January 9, 2012 09:58 |
BCs for Pressure Correction Equation (SIMPLE) | Bharath Somayaji | Main CFD Forum | 1 | March 1, 2006 07:12 |
Need Assistance: BCs for k-e model implementation | Dean Schrage | Main CFD Forum | 3 | August 11, 2001 02:02 |