Skip to content

Commit

Permalink
Merge branch 'QuadraticQuadsAbaqus' of github.com:DanielDoehring/Trix…
Browse files Browse the repository at this point in the history
…i.jl into QuadraticQuadsAbaqus
  • Loading branch information
DanielDoehring committed Dec 26, 2024
2 parents d3a99df + 35100a4 commit fa65385
Show file tree
Hide file tree
Showing 17 changed files with 775 additions and 14 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ for human readability.
and [NLsolve.jl](https://github.com/JuliaNLSolvers/NLsolve.jl) ([#2008])
- `LobattoLegendreBasis` and related datastructures made fully floating-type general,
enabling calculations with higher than double (`Float64`) precision ([#2128])
- In 2D, quadratic elements, i.e., 8-node (quadratic) quadrilaterals and 6-node are now supported in standard Abaqus `inp` format ([#2217])
- In 2D, quadratic elements, i.e., 8-node (quadratic) quadrilaterals are now supported in standard Abaqus `inp` format ([#2217])

## Changes when updating to v0.9 from v0.8.x

Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Trixi"
uuid = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
authors = ["Michael Schlottke-Lakemper <[email protected]>", "Gregor Gassner <[email protected]>", "Hendrik Ranocha <[email protected]>", "Andrew R. Winters <[email protected]>", "Jesse Chan <[email protected]>"]
version = "0.9.12-DEV"
version = "0.9.13-DEV"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand Down Expand Up @@ -108,7 +108,7 @@ StaticArrays = "1.5"
StrideArrays = "0.1.26"
StructArrays = "0.6.11"
SummationByPartsOperators = "0.5.41"
T8code = "0.7.2"
T8code = "0.7.4"
TimerOutputs = "0.5.7"
Triangulate = "2.2"
TriplotBase = "0.1"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ installation and postprocessing procedures. Its features include:
* Compressible Navier-Stokes equations
* Magnetohydrodynamics (MHD) equations
* Multi-component compressible Euler and MHD equations
* Multi-ion compressible MHD equations
* Linearized Euler and acoustic perturbation equations
* Hyperbolic diffusion equations for elliptic problems
* Lattice-Boltzmann equations (D2Q9 and D3Q27 schemes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ equations_parabolic = CompressibleNavierStokesDiffusion2D(equations, mu = mu(),
# set the freestream flow parameters such that c_inf = 1.0 => Mach 0.2
rho_freestream = 1.4

# Values correspond to `aoa = 4 * pi / 180`
v1 = 0.19951281005196486 # 0.2 * cos(aoa)
v2 = 0.01395129474882506 # 0.2 * sin(aoa)

Expand Down
61 changes: 61 additions & 0 deletions examples/t8code_3d_dgsem/elixir_advection_cubed_sphere.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using OrdinaryDiffEq
using Trixi

###############################################################################
# semidiscretization of the linear advection equation

advection_velocity = (0.2, -0.7, 0.5)
equations = LinearScalarAdvectionEquation3D(advection_velocity)

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs)

initial_condition = initial_condition_convergence_test

boundary_condition = BoundaryConditionDirichlet(initial_condition)
boundary_conditions = Dict(:inside => boundary_condition,
:outside => boundary_condition)

# Note that the first argument refers to the level of refinement, unlike in for p4est
mesh = Trixi.T8codeMeshCubedSphere(5, 3, 0.5, 0.5;
polydeg = 3, initial_refinement_level = 0)

# A semidiscretization collects data structures and functions for the spatial discretization
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
boundary_conditions = boundary_conditions)

###############################################################################
# ODE solvers, callbacks etc.

# Create ODE problem with time span from 0.0 to 1.0
tspan = (0.0, 1.0)
ode = semidiscretize(semi, tspan)

# At the beginning of the main loop, the SummaryCallback prints a summary of the simulation setup
# and resets the timers
summary_callback = SummaryCallback()

# The AnalysisCallback allows to analyse the solution in regular intervals and prints the results
analysis_callback = AnalysisCallback(semi, interval = 100)

# The SaveSolutionCallback allows to save the solution to a file in regular intervals
save_solution = SaveSolutionCallback(interval = 100,
solution_variables = cons2prim)

# The StepsizeCallback handles the re-calculation of the maximum Δt after each time step
stepsize_callback = StepsizeCallback(cfl = 1.2)

# Create a CallbackSet to collect all callbacks such that they can be passed to the ODE solver
callbacks = CallbackSet(summary_callback, analysis_callback, save_solution,
stepsize_callback)

###############################################################################
# run the simulation

# OrdinaryDiffEq's `solve` method evolves the solution in time and executes the passed callbacks
sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false),
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
save_everystep = false, callback = callbacks);

# Print the timer summary
summary_callback()
Loading

0 comments on commit fa65385

Please sign in to comment.