NasCar
Loading...
Searching...
No Matches
Macros | Functions
Prediction.c File Reference

Prediction step of the Chorin and Temam fractional step method. More...

#include "petscdmda.h"
#include "petscksp.h"
#include "petscpc.h"
#include <time.h>
#include "struct.h"
#include "Transport.h"
#include "Prediction.h"
#include "Lins.h"
#include "Vectors.h"
Include dependency graph for Prediction.c:

Macros

#define __FUNCT__   "time_step"
 
#define __FUNCT__   "prediction"
 
#define __FUNCT__   "predictionf"
 
#define __FUNCT__   "prediction_matrix"
 
#define __FUNCT__   "prediction_solve"
 

Functions

PetscErrorCode time_step (Simu *simu, Grid grid, Proc proc, Fields vec, Arrays arr)
 Computation of the time step.
 
PetscErrorCode prediction (Simu simu, Grid grid, Proc proc, Fields vec, Arrays arr, Obs obs, Linear *lin)
 Prediction step of the Chorin-Temam scheme (cell center)
 
PetscErrorCode predictionf (Simu simu, Grid grid, Proc proc, Fields vec, Arrays arr, Obs obs, Linear *lin)
 Prediction step of the Chorin-Temam scheme: interpolation to face center.
 
PetscErrorCode prediction_matrix (Simu simu, Grid grid, Proc proc, Fields vec, Arrays arr, Obs obs, Linear *lin)
 Prediction matrix for implicit viscous terms.
 
PetscErrorCode prediction_solve (Linear *lin, Fields vec)
 Prediction solve for implicit viscous terms.
 

Detailed Description

Prediction step of the Chorin and Temam fractional step method.

Note
Chorin and Temam fractional step sscheme to solve the incompressible Navier-Stokes equations [13] [23]
(1) Prediction: the momemtum equation is solve from a pressure guess
(2) Poisson: solve the Poisson equation
(3) Correction: correct the pressure and velocity to get a divergence free velocity field This is the prediction step of the Chorin and Temam fractional step method. Starting from a pressure guess, solve the momentum equation.
Author
Michel Bergmann
Date
2023-03-03

Function Documentation

◆ prediction()

PetscErrorCode prediction ( Simu  simu,
Grid  grid,
Proc  proc,
Fields  vec,
Arrays  arr,
Obs  obs,
Linear lin 
)

Prediction step of the Chorin-Temam scheme (cell center)

Solve the cell momemtum equation strating for a pressure guess.

The numerical schemes for discretiztion of the convective and diffusive terms can be choose in INPUT.DAT.

The velocity solution is cell centered.

◆ prediction_matrix()

PetscErrorCode prediction_matrix ( Simu  simu,
Grid  grid,
Proc  proc,
Fields  vec,
Arrays  arr,
Obs  obs,
Linear lin 
)

Prediction matrix for implicit viscous terms.

Remarks
it works only for mono-fluid right now

◆ prediction_solve()

PetscErrorCode prediction_solve ( Linear lin,
Fields  vec 
)

Prediction solve for implicit viscous terms.

Remarks
it works only for mono-fluid right now

◆ predictionf()

PetscErrorCode predictionf ( Simu  simu,
Grid  grid,
Proc  proc,
Fields  vec,
Arrays  arr,
Obs  obs,
Linear lin 
)

Prediction step of the Chorin-Temam scheme: interpolation to face center.

Computation of the face centered velocity (From Rhie and Chow).

This helps removing the odd-even couppling for collocated variables.

This velocity will be used to computed the divergence for the projection steps (Poisson.c)

◆ time_step()

PetscErrorCode time_step ( Simu simu,
Grid  grid,
Proc  proc,
Fields  vec,
Arrays  arr 
)

Computation of the time step.

The time step has to respect some conditions