Skip to content
Snippets Groups Projects
Commit b19c79a8 authored by Laura Christine Kühle's avatar Laura Christine Kühle
Browse files

Added annotations to questions to Burgers.

parent 3864693d
Branches
No related tags found
No related merge requests found
...@@ -22,19 +22,23 @@ TODO: Contemplate using lambdify for basis ...@@ -22,19 +22,23 @@ TODO: Contemplate using lambdify for basis
TODO: Contemplate allowing vector input for ICs TODO: Contemplate allowing vector input for ICs
TODO: Discuss how wavelet details should be plotted TODO: Discuss how wavelet details should be plotted
TODO: Ask whether we are dealing with inviscid Burgers only TODO: Ask whether we are dealing with inviscid Burgers only -> Done (yes)
TODO: Ask why we limit the initial time step TODO: Ask why we limit the initial time step -> Done (to prevent
TODO: Ask whether cfl number should be absolute value irregularities related to instability in later steps)
TODO: Ask why cells 1 and -2 are adjusted for Dirichlet boundary TODO: Ask whether cfl number should be absolute value -> Done (by definition)
TODO: Ask why cells 1 and -2 are adjusted for Dirichlet boundary -> Done (
not sure, try with ghost cells only for now)
TODO: Ask why height adjustment and stretch factor are considered outside of TODO: Ask why height adjustment and stretch factor are considered outside of
implicit solver function implicit solver function -> Done (can be in solver)
TODO: Ask about workings of implicit solver for Burgers TODO: Ask about workings of implicit solver for Burgers
TODO: Ask whether Burgers has compatible ICs other than Sine and -> Done (look into file burgex.f)
DiscontinuousConstant TODO: Ask whether Burgers has compatible ICs other than Sine (shock case) and
DiscontinuousConstant (rarefaction) -> Done (yes, but irrelevant for now)
TODO: Ask about fluxes other than Lax Friedrich -> Done (not needed now)
Urgent: Urgent:
TODO: Add Burgers class completely TODO: Add Burgers class completely
TODO: Enabale choice of equation TODO: Enable choice of equation
TODO: Add subclasses of Burgers TODO: Add subclasses of Burgers
TODO: Ignore ghost domains by flagging all cells with it for extreme outlier TODO: Ignore ghost domains by flagging all cells with it for extreme outlier
TODO: Add functions to create each object from dict TODO: Add functions to create each object from dict
......
...@@ -522,6 +522,7 @@ class Burgers(Equation): ...@@ -522,6 +522,7 @@ class Burgers(Equation):
Code adapted from DG code by Hesthaven. Code adapted from DG code by Hesthaven.
""" """
# Shock speed = 1/2*(left+right values)
sspeed = self._init_cond._height_adjustment sspeed = self._init_cond._height_adjustment
uexact = np.zeros(np.size(grid_values)) uexact = np.zeros(np.size(grid_values))
...@@ -529,10 +530,15 @@ class Burgers(Equation): ...@@ -529,10 +530,15 @@ class Burgers(Equation):
xx = np.linspace(0, 1, 200) xx = np.linspace(0, 1, 200)
uu = np.sin(self._init_cond._factor * np.pi * xx) uu = np.sin(self._init_cond._factor * np.pi * xx)
# Scale time for domain
te = self._final_time * (2 / mesh.interval_len) te = self._final_time * (2 / mesh.interval_len)
# Initial characteristic guess (where is the solution)
xt0 = (2 / mesh.interval_len) * ( xt0 = (2 / mesh.interval_len) * (
grid_values-sspeed * self._final_time).reshape( grid_values-sspeed * self._final_time).reshape(
np.size(grid_values)) np.size(grid_values))
# Check whether in interval
for ix in range(len(xt0)): for ix in range(len(xt0)):
if xt0[ix] > 1: if xt0[ix] > 1:
xt0[ix] -= 2 * np.floor(0.5 * (xt0[ix]+1)) xt0[ix] -= 2 * np.floor(0.5 * (xt0[ix]+1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment