CFD Online Discussion Forums

CFD Online Discussion Forums (
-   SU2 (
-   -   Custom BCs (

sss3700 January 26, 2013 18:57

Custom BCs
How is the 'custom' boundary condition used in SU2?

Amrita Lonkar January 30, 2013 11: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))

sss3700 February 11, 2013 12:00

1 Attachment(s)
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?

shirazbj February 12, 2013 19:24


Originally Posted by sss3700 (Post 407171)
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 got Paraview open error too, see here:

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.

sss3700 February 12, 2013 22:10

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!

sss3700 February 28, 2013 22:36

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:


/*--- 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 ---*/
/*--- Change rows of the Jacobian (includes 1 in the diagonal) ---*/
if (implicit)
    for (iVar = 0; iVar < nVar; iVar++) {
        total_index = iPoint*nVar+iVar;

diwakaranant March 7, 2013 07:05

Implementing custom BC

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).


diwakaranant March 12, 2013 02:50

Doubt in implementing custon BC

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 ?


All times are GMT -4. The time now is 22:43.