CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Custom BCs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 26, 2013, 17:57
Default Custom BCs
  #1
New Member
 
Join Date: Jan 2013
Posts: 12
Rep Power: 13
sss3700 is on a distinguished road
How is the 'custom' boundary condition used in SU2?
sss3700 is offline   Reply With Quote

Old   January 30, 2013, 10:14
Default
  #2
New Member
 
Amrita Lonkar
Join Date: Nov 2012
Posts: 14
Rep Power: 13
Amrita Lonkar is on a distinguished road
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))
Amrita Lonkar is offline   Reply With Quote

Old   February 11, 2013, 11:00
Default
  #3
New Member
 
Join Date: Jan 2013
Posts: 12
Rep Power: 13
sss3700 is on a distinguished road
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?
Attached Files
File Type: txt BC_Custom.txt (1.7 KB, 46 views)
sss3700 is offline   Reply With Quote

Old   February 12, 2013, 18:24
Default
  #4
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
Quote:
Originally Posted by sss3700 View Post
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:
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.
shirazbj is offline   Reply With Quote

Old   February 12, 2013, 21:10
Default
  #5
New Member
 
Join Date: Jan 2013
Posts: 12
Rep Power: 13
sss3700 is on a distinguished road
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 is offline   Reply With Quote

Old   February 28, 2013, 21:36
Default
  #6
New Member
 
Join Date: Jan 2013
Posts: 12
Rep Power: 13
sss3700 is on a distinguished road
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);
    }
sss3700 is offline   Reply With Quote

Old   March 7, 2013, 06:05
Default Implementing custom BC
  #7
Member
 
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 13
diwakaranant is on a distinguished road
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
diwakaranant is offline   Reply With Quote

Old   March 12, 2013, 01:50
Default Doubt in implementing custon BC
  #8
Member
 
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 13
diwakaranant is on a distinguished road
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
diwakaranant is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate pressure forces using custom field functions? tsagaro FLUENT 7 June 23, 2017 15:45
Dealing with BC's in OF 1.6 vkrastev OpenFOAM Running, Solving & CFD 5 September 4, 2012 11:58
Understanding Code behind BCs Linse OpenFOAM Programming & Development 8 January 9, 2012 08:58
BCs for Pressure Correction Equation (SIMPLE) Bharath Somayaji Main CFD Forum 1 March 1, 2006 06:12
Need Assistance: BCs for k-e model implementation Dean Schrage Main CFD Forum 3 August 11, 2001 01:02


All times are GMT -4. The time now is 20:08.