Prescribes the Eulerian fields from the case's source instead of solving for them. More...
#include "AnalyticalSolutions.h"#include "expression.h"#include "Boundaries.h"#include "Metric.h"#include "logging.h"#include "setup.h"Go to the source code of this file.
Data Structures | |
| struct | AnalyticalField |
| The prescribed field: the case's source, and what it reuses from step to step. More... | |
Functions | |
| static PetscErrorCode | AnalyticalFieldCreate (SimCtx *simCtx) |
| Read the source once, and work out what it depends on. | |
| PetscErrorCode | AnalyticalFieldDestroy (SimCtx *simCtx) |
| Implementation of AnalyticalFieldDestroy(). | |
| PetscBool | AnalyticalFieldSupportsInterpolationError (const SimCtx *simCtx) |
| Implementation of AnalyticalFieldSupportsInterpolationError(). | |
| static PetscErrorCode | SetBoundaryVelocityFromSource (UserCtx *user, const struct AnalyticalField *field, PetscInt block, PetscReal physical_time) |
| Set Ubcs on every physical boundary face to the source at the face centre. | |
| PetscErrorCode | AnalyticalSolutionEngine (SimCtx *simCtx) |
| Implementation of AnalyticalSolutionEngine(). | |
| PetscErrorCode | SetAnalyticalSolutionForParticles (Vec tempVec, SimCtx *simCtx) |
| Implementation of SetAnalyticalSolutionForParticles(). | |
Prescribes the Eulerian fields from the case's source instead of solving for them.
With eulerian_field_source: analytical, the field is the initial condition's source, evaluated at the step's time through the operations every target of a source shares: fluxes at the faces (PicurvSourceAddFluxes()) and a bulk velocity (PicurvSourceCellBulkFactor()). A Cartesian source also sets Ucat and an optional pressure at the cell centres, exactly; a curvilinear one derives Ucat from its fluxes.
The boundary values are this module's own Ubcs, so after setting the state it runs the part of the solved flow's finalization that does not refresh them from the boundary handlers (FinalizeCellFieldsFromBoundaryValues()).
Definition in file AnalyticalSolutions.c.
| struct AnalyticalField |
The prescribed field: the case's source, and what it reuses from step to step.
Definition at line 24 of file AnalyticalSolutions.c.
| Data Fields | ||
|---|---|---|
| PicurvVelocitySource | source | |
| PicurvExpression * | pressure | |
| PetscBool | time_dependent | |
| PetscBool | pointwise | |
| PetscBool | evaluated | |
| PetscReal | factor | |
| Vec * | fraction | |
| Vec * | length | |
| PicurvSourceFaceSlots(* | faces)[6] | |
|
static |
Read the source once, and work out what it depends on.
Collective.
Definition at line 37 of file AnalyticalSolutions.c.
| PetscErrorCode AnalyticalFieldDestroy | ( | SimCtx * | simCtx | ) |
Implementation of AnalyticalFieldDestroy().
Release what AnalyticalSolutionEngine() keeps from step to step, if anything.
Definition at line 88 of file AnalyticalSolutions.c.
| PetscBool AnalyticalFieldSupportsInterpolationError | ( | const SimCtx * | simCtx | ) |
Implementation of AnalyticalFieldSupportsInterpolationError().
Reports whether the analytical field can be compared with interpolated particle velocities.
Definition at line 113 of file AnalyticalSolutions.c.
|
static |
Set Ubcs on every physical boundary face to the source at the face centre.
Definition at line 122 of file AnalyticalSolutions.c.
| PetscErrorCode AnalyticalSolutionEngine | ( | SimCtx * | simCtx | ) |
Implementation of AnalyticalSolutionEngine().
Sets the Eulerian fields from the case's source (-ic_source_*) at the step's time.
The field is the case's source, evaluated at the step's time. As on an inlet, a source that does not read t is evaluated once.
Definition at line 158 of file AnalyticalSolutions.c.
| PetscErrorCode SetAnalyticalSolutionForParticles | ( | Vec | tempVec, |
| SimCtx * | simCtx | ||
| ) |
Implementation of SetAnalyticalSolutionForParticles().
Evaluates the analytical velocity at particle positions.
Only a pointwise source reaches here; see AnalyticalFieldSupportsInterpolationError().
Definition at line 199 of file AnalyticalSolutions.c.