HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Compute aerodynamic forces on immersed body, if present. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <basic.h>
#include <common.h>
#include <arrayfunctions.h>
#include <mathfunctions.h>
#include <immersedboundaries.h>
#include <physicalmodels/navierstokes3d.h>
#include <mpivars.h>
#include <hypar.h>
Go to the source code of this file.
Functions | |
int | NavierStokes3DComputePressure (double *, const double *const, void *) |
int | NavierStokes3DComputeTemperature (double *, const double *const, void *) |
static int | ComputeShear (void *s, void *m, const double *const u, double **const sf) |
static int | WriteSurfaceData (void *m, void *ib, const double *const p_surface, const double *const T_surface, const double *const ngrad_p_surface, const double *const ngrad_T_surface, const double *const shear, char *filename) |
int | NavierStokes3DIBForces (void *s, void *m, double a_t) |
Compute aerodynamic forces on immersed body, if present.
Definition in file NavierStokes3DIBForces.c.
int NavierStokes3DComputePressure | ( | double * | P, |
const double *const | u, | ||
void * | s | ||
) |
Compute the pressure from the conserved solution on a grid
P | Array to hold the computed pressure (same layout as u) |
u | Array with the solution vector |
s | Solver object of type HyPar |
Definition at line 31 of file NavierStokes3DFunctions.c.
int NavierStokes3DComputeTemperature | ( | double * | T, |
const double *const | u, | ||
void * | s | ||
) |
Compute the temperature from the conserved solution on a grid
T | Array to hold the computed pressure (same layout as u) |
u | Array with the solution vector |
s | Solver object of type HyPar |
Definition at line 65 of file NavierStokes3DFunctions.c.
|
static |
Calculate the shear forces on the immersed body surface: for each "local facet", i.e., facets (of the immersed body surface) that lie within the local computational domain of this MPI rank, compute the shear forces at the facet centroid from the flow variables at the grid points surrounding the facet.
The array to hold the computed shear forces must be NULL when this function is called. If the current subdomain contains a part of the immersed body, they will point to arrays with the local data. Otherwise, they will remain NULL.
The shear force array will be of the size (4 X ImmersedBoundary::nfacets_local), where the ordering of the data is: x-component, y-component, z-component, magnitude.
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
u | Array containing the conserved flow variables |
sf | Array for (x,y,z)-components & magnitude of shear |
Definition at line 37 of file NavierStokes3DIBForces.c.
|
static |
Write the surface data on the immersed body to a ASCII Tecplot file.
m | MPI object of type MPIVariables |
ib | Immersed body object of type ImmersedBoundary |
p_surface | array with local surface pressure data |
T_surface | array with local surface temperature data |
ngrad_p_surface | array with local normal gradient of surface pressure data |
ngrad_T_surface | array with local normal gradient of surface temperature data |
shear | array with local shear data |
filename | Name of file to write |
Definition at line 138 of file NavierStokes3DIBForces.c.
int NavierStokes3DIBForces | ( | void * | s, |
void * | m, | ||
double | a_t | ||
) |
Calculate the aerodynamic forces on the immersed body surface and write them to file
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
a_t | Current simulation time |
Definition at line 264 of file NavierStokes3DIBForces.c.