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

Time varying far field boundary conditions

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 15, 2022, 09:18
Default Time varying far field boundary conditions
  #1
Member
 
Anders Aamodt Resell
Join Date: Dec 2021
Location: Oslo, Norway
Posts: 64
Rep Power: 4
ander is on a distinguished road
Dear SU2 devs,

I'm trying to modify the source code to account for time varying far field boundary conditions for the Euler Equations. (In the future I would also like to extend them to vary spatially, but this is a first step).

I have modified the function CEulerSolver::BC_Far_Field, and the edited piece of the code looks like this:

Code:
      bool UsingTraject = config->UsingTrajectory();
      Vel2_Infty = 0.0; Vn_Infty = 0.0;
      for (iDim = 0; iDim < nDim; iDim++) {
          Vel_Infty[iDim] = UsingTraject ? config->GetVelocityFS_Traject(iDim) : 
          GetVelocity_Inf(iDim);
          Vel2_Infty     += Vel_Infty[iDim]*Vel_Infty[iDim];
          Vn_Infty       += Vel_Infty[iDim]*UnitNormal[iDim];
      }
      Density_Infty = UsingTraject ? config->GetDensityFS_Traject() : GetDensity_Inf();
      Pressure_Infty   = UsingTraject ? config->GetPressureFS_Traject() : 
          GetPressure_Inf();
      SoundSpeed_Infty = sqrt(Gamma*Pressure_Infty/Density_Infty);
      Entropy_Infty    = pow(Density_Infty, Gamma)/Pressure_Infty;
Here I have added some additionals values and functions to CConfig. The bool UsingTraject specifies if the time varying conditions are used. The functions Get_XXX_FS_Traject() reads in time varying free stream values from the config file, and these free stream values are updated once each timestep.

However my implementation doesn't seem to work. I have ran a supersonic case on a wedge-like object where I gradually changed the direction of the freestream velocity, but the incoming field doesn't seem to change direction.

I would like some guidance on possible reasons for why my implementation is failing. Is there is something wrong in my assumption that I can modify the BC_Far_Field function in this way?

Thanks in advance!

Last edited by ander; November 15, 2022 at 12:40.
ander is offline   Reply With Quote

 


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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
[swak4Foam] swakExpression not writing to log alexfells OpenFOAM Community Contributions 3 March 16, 2020 18:19
My radial inflow turbine Abo Anas CFX 27 May 11, 2018 01:44
CFD analaysis of Pelton turbine amodpanthee CFX 31 April 19, 2018 18:02
Radiation interface hinca CFX 15 January 26, 2014 17:11


All times are GMT -4. The time now is 12:01.