2D advection/diffusion equation solver#39
Open
rouson wants to merge 47 commits into
Open
Conversation
This commit 1. Adds an operator(.dot.) generic binding to vector_2D_t 2. Makes the interpolator_1D_t child type constructors elemental to support the .dot. procedure definition. 3. Appends "_extended" to the interpolator_1D_t's center_values type-bound procedure name to better describe the result.
*.gif *.png *.pdf *.mp4
This commit adds a work-in-progress example of a 2D advection/diffusion equation solver along with the supporting infrastructure.
This commit fixes an issue with storing data on staggered grids, wherein the number and layout of the points across the spatial domain varies depending on the type of information. The commit 1. Refactors the tensor_2D_t type, replacing its 6D values_ array component with a 4D points_2D_t array component containing a 2D values_ array component. 2. Adjusts the tensor_2D_m module and the corresponding submodules accordingly. 3. Defines a new scalar_product_2D_t type to store, for example, the dot product of two vector_2D_t objects. Dot products produce values at cell centers only, which necessitates a different storage format from that of scalar_2D_t objects. The latter also stores boundary values. 4. Refactors divergence_2D_t so it extends scalar_product_2D_t. What works ---------- `fpm build --compiler flang --profile release` To Do ----- Fix `fpm test ...`
import the required Julienne operators and fix an operand name
This commit fixes the manifest to list Julienne under [dependencies] rather than [dev-dependencies] to ensure Julienne builds with `fpm build` too rather than only with `fpm test`. This is required because the Formal library uses Julienne features, including assertions, types, and format strings.
also fix file I/O
This commit replaces the 2D potential-flow vortex example with a 2D potential-flow stagnation-point example. The change fixes an that corrupted the vortex results near the y axes, presumably due to the singularity at the origin. The stagnation-point flow field has no singularities and the numerical result closely matches the sampled analytical gradient of the corresponding scalar potential.
This commit improves the plotting of vector fields saved by the 2D-stagnation-point example program. Now all vectors are normalized to the same length. Vector magnitudes remain color- coded. This change addresses an issue that made plots difficult to interpret because many vectors were being scaled such that they overlapped with several neighboring vectors.
This commit finishes fixing dot (scalar) products of 2D vectors, including replacing vector_2D_at_cell_centers with vector_2D_co_located_components. This commit ensures that both 2D vector components are available at all points required for computing a scalar result, including corner values.
This commit fixes the 2D vector-field gnuplot script. Previous version of the script processed the header incorrectly, leading to one stray vector, an incorrect title, and incorrect axis labels.
This reverts commit b87a529.
Replace component names with single vector name: "vector_x, vector_y" -> "vector"
This commit renames scalar_product_2D_t to divergence_2D_t and removes the previous divergence_2D_t, which trivially extended scalar_product_2D_t.
This commit finishes defining the operators required for expressing
the two-dimensional (2D) advection/diffusion equation:
ds_dt = .div. (D * .grad. s) - (v .dot. .grad. s)
where
* D is a constant, double-precision molecular diffusion coefficient
* s is a scalar_2D_t advected/diffused scalar field
* v is a vector_2D_t prescribed advection velocity field
* ds_dt is the time derivative of s
* .div. is the divergence operator
* .grad. is the gradient operator
* .dot. is the dot-product operator
other minor renamings
This commit finishes defining the operators required for expressing
the Runge-Kutta time advancement schemes such as explicit Euler:
s = s + dt * d_dt(s, v)
where
* dt is a constant, double-precision time step
* s is a scalar_2D_t advected/diffused scalar field
* v is a vector_2D_t prescribed advection velocity field
* d_dt(s, v) is the time derivative of s for a given v
This commit removes all files that support 3D data structures and algorithms. The 3D code will need a redesign analogous to the recent redesign of the 2D code. That process will likly be most natural and straightforward if the 2D files are copied and modified for 3D.
4bb3fdd to
614c0eb
Compare
614c0eb to
f32e10f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.