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

add source terms, user-defined boundary condition and set up a transient simulation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2014, 23:38
Default add source terms, user-defined boundary condition and set up a transient simulation
  #1
New Member
 
Jianguo
Join Date: May 2011
Posts: 11
Rep Power: 15
zhengjg is on a distinguished road
Dear SU2 developers and users,
I am using SU2 eagle in my research.
But I encountered a few problems which have not been resolved.

1. How can I add an constant source term to energy equation in SU2 3.0 eagle? Is there any module in the software suit to implement this source term?

2. Is there module to add user-defined boundary conditions?

3. Is there any tutorial or example of demonstrating the setup of an transient flow simulation using explicit Runge-Kutta or dual-time-stepping methodologies, say the flow past a cylinder at higher Reynolds number with periodic vortex shedding as shown in flyer of SU2 eagle and earlier version?
I am interested in parameters configuration and setup involved in the two time discretization for unsteady flow.

Thank you very much
JG
zhengjg is offline   Reply With Quote

Old   January 30, 2014, 00:54
Default
  #2
Super Moderator
 
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15
fpalacios is on a distinguished road
Quote:
Originally Posted by zhengjg View Post
Dear SU2 developers and users,
I am using SU2 eagle in my research.
But I encountered a few problems which have not been resolved.

1. How can I add an constant source term to energy equation in SU2 3.0 eagle? Is there any module in the software suit to implement this source term?

2. Is there module to add user-defined boundary conditions?

3. Is there any tutorial or example of demonstrating the setup of an transient flow simulation using explicit Runge-Kutta or dual-time-stepping methodologies, say the flow past a cylinder at higher Reynolds number with periodic vortex shedding as shown in flyer of SU2 eagle and earlier version?
I am interested in parameters configuration and setup involved in the two time discretization for unsteady flow.

Thank you very much
JG
Dear JG,

Thanks a lot for your interest in SU2.
To add a source term in SU2 is easy but you should be familiar with C++: There is an elegant way based on creating a class in Numerics (files numerics_direct_mean.cpp, and numerics_structure.hpp). The class CSourceGravity is a good example. Once you have created the class, you should go to Numerics_Preprocessing subroutine (definition_structure.cpp) and allocate the class
numerics_container[iMGlevel][FLOW_SOL][SOURCE_FIRST_TERM] = new CSourceGravity(nDim, nVar_Flow, config);

There is a quick way to add a source term just modifying the residual in the subroutine
void CEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CNumerics *second_numerics, CConfig *config, unsigned short iMesh)

To add a new boundary condition, my recommendation is to copy one of the typical ones. Like
void CEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
CNumerics *visc_numerics, CConfig *config, unsigned short val_marker).

And add the new boundary condition at the end of
void CIntegration::Space_Integration(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem).

There are some unsteady problems in the Testcases folder, for example in the TestCases/optimization_euler/pitching_naca64a010/ folder. But as far I remember in this forum (maybe an old post) we also provided the config case for an unsteady problem. Anyway to run an unsteady problem, at least you should add the following to a typical config file.

% ------------------------- UNSTEADY SIMULATION -------------------------------%
%
% Unsteady simulation (NO, TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER,
% DUAL_TIME_STEPPING-2ND_ORDER, TIME_SPECTRAL)
UNSTEADY_SIMULATION= DUAL_TIME_STEPPING-2ND_ORDER
%
% Time Step for dual time stepping simulations (s)
UNST_TIMESTEP= 0.001
%
% Total Physical Time for dual time stepping simulations (s)
UNST_TIME= 1.0
%
% Number of internal iterations (dual time method)
UNST_INT_ITER= 200


Best,
Francisco
fpalacios 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
User defined scalar boundary condition Philip FLUENT 1 December 4, 2013 10:23
How to set the Heat Flux boundary condition at Outlet creddy_trddc CFX 3 September 21, 2011 07:44
Transient Simulation: Boundary Condition Problem Shafiul CFX 7 January 11, 2011 16:40
how to set up a wall boundary condition according to calculated wall shear stress? gameoverli OpenFOAM Pre-Processing 1 May 21, 2009 08:28
How to set boundary condition in Fluent for the fo Peiyong FLUENT 1 November 10, 2006 11:44


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