
% small compressible 2D solver as example for paper 
% Julius Reiss,  Pressure-Tight and Non-stiff Volume Penalization for Compressible Flows,  JOURNAL OF SCIENTIFIC COMPUTING,  
% DOI: 10.1007/s10915-021-01747-x
% and  https://arxiv.org/abs/2103.08144
% 
% It does not aim to be a full solver but an illustration of the described method 
%
% The basic solver with classical boundary treatment described in 
% Reiss et al 2014,  http://dx.doi.org/10.1016/j.compfluid.2014.06.004
%
% copyright Julius Reiss, reiss@tnt.tu-berlin.de,  julius.reiss@mailfence.com
% license 
% CC BY-NC-ND: 
% This license allows reusers to copy and distribute the material in any medium or format in unadapted form only, for noncommercial purposes only, and only so long as attribution is given to the creator. 
# This code is provided without any warranty whatsoever, express or implied. 

This document describes the small solver

comSiSkew (compressible simple Skew)

including embedded geometries. 

 

Getting started 
===============

It should run out of the box, tested on matlab 9.8.0.1538580 (R2020a) Update 6

just run 
> mainSolver 

the different cases are stored per user and case, just check: 

config.m 

File Structure
==============

config.m                    contains the general settings
mainSolver.m                high level calls for solver

USER/{username}/{casename}  folder containing all parameters for a simulation            
  in there   parameter.m    evaluated to get most settings
                            other routines are defined in there to create a start field, derivatives and so on. 
                            Routines are given as function handles (the @) 
                                           
             geometry.m     geometry specific setting (this name can be changed in parameter.m: params.geometry.initGeometry = @geometry  ;)	                 
                             
LIB/                        has all the needed routines, sorted:    
LIB/BOUND                   boundary treatment 
LIB/EQUATION                the Navier Stokes equation and such stuff 
LIB/GEOM                    geometry creation (euclidean and other)  
LIB/HELPER                  small functions to do all kind of service 
LIB/INIT                    init the solver
LIB/MAIN                    main routines (just calcFlow.m when writing)  
LIB/MATH                    derivatives, time stepping and so on 
LIB/PLOT                    plotting 
LIB/START                   initial conditions



Data Structure 
===============

The variables are grouped in parameter (params) and data (values)

params 
======
is a structure, which contains sub-structures  
             io: [1x1 struct]       reading, writing, case,  
       equation: [1x1 struct]       which rhs, which variables, with friction (NavierStokes)? 
    derivatives: [1x1 struct]       which derivatives, precalc matrices 
       material: [1x1 struct]       gas properties 
      reference: [1x1 struct]       reference values (e.g. for boundaries)
       geometry: [1x1 struct]       grid, grid factors, 
          start: [1x1 struct]       to set start condition  
           time: [1x1 struct]       time stepping 
           plot: [1x1 struct]       controles all plotting  
        display: [1x1 struct]       controles the output 
          write: [1x1 struct]       controles writing of data while simulation  
       boundary: [1x1 struct]       defines boundary conditions


values_0 , values_n are a fields of dim (Nxi, Neta, variableNumber)
The variables are described in params.equation.vars, at the moment: 
{ 'sqrho'    'sqrhoU'    'sqrhoV'    'p'} eg  sqrt(rho),sqrt(rho)u,sqrt(rho)v, p 

To transfer primitive variables to and from the functions 
packRhoUVP and givePrimitive are helpful. 

