Skip to content

Commit

Permalink
Add a first tracer test with DG
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisb authored and oguevremont committed Sep 24, 2024
1 parent 1adb1c5 commit d954dfd
Show file tree
Hide file tree
Showing 2 changed files with 285 additions and 0 deletions.
87 changes: 87 additions & 0 deletions applications_tests/lethe-fluid/dg_tracer_advection_tanh.output
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Running on 1 MPI rank(s)...
Number of active cells: 1024
Number of degrees of freedom: 3267
Volume of triangulation: 1
Number of tracer degrees of freedom: 4096

*******************************************************************************
Transient iteration: 1 Time: 0.02 Time step: 0.02 CFL: 0.567185
*******************************************************************************
L2 error velocity : 5.55112e-17
L2 error tracer : 0.00334962

*******************************************************************************
Transient iteration: 2 Time: 0.04 Time step: 0.02 CFL: 0.567185
*******************************************************************************
L2 error velocity : 5.55112e-17
L2 error tracer : 0.00685486

*******************************************************************************
Transient iteration: 3 Time: 0.06 Time step: 0.02 CFL: 0.567185
*******************************************************************************
L2 error velocity : 5.55112e-17
L2 error tracer : 0.00988011

*******************************************************************************
Transient iteration: 4 Time: 0.08 Time step: 0.02 CFL: 0.567185
*******************************************************************************
L2 error velocity : 5.55112e-17
L2 error tracer : 0.0137154

*******************************************************************************
Transient iteration: 5 Time: 0.1 Time step: 0.02 CFL: 0.567185
*******************************************************************************
L2 error velocity : 5.55112e-17
L2 error tracer : 0.0164935

*******************************************************************************
Transient iteration: 6 Time: 0.12 Time step: 0.02 CFL: 0.567185
*******************************************************************************
L2 error velocity : 5.55112e-17
L2 error tracer : 0.0193332

*******************************************************************************
Transient iteration: 7 Time: 0.14 Time step: 0.02 CFL: 0.567185
*******************************************************************************
L2 error velocity : 5.55112e-17
L2 error tracer : 0.0227292

*******************************************************************************
Transient iteration: 8 Time: 0.16 Time step: 0.02 CFL: 0.567185
*******************************************************************************
L2 error velocity : 5.55112e-17
L2 error tracer : 0.0248777

*******************************************************************************
Transient iteration: 9 Time: 0.18 Time step: 0.02 CFL: 0.567185
*******************************************************************************
L2 error velocity : 5.55112e-17
L2 error tracer : 0.0276809

*******************************************************************************
Transient iteration: 10 Time: 0.2 Time step: 0.02 CFL: 0.567185
*******************************************************************************
L2 error velocity : 5.55112e-17
L2 error tracer : 0.0305589
time error_velocity
0.0200 5.551115e-17
0.0400 5.551115e-17
0.0600 5.551115e-17
0.0800 5.551115e-17
0.1000 5.551115e-17
0.1200 5.551115e-17
0.1400 5.551115e-17
0.1600 5.551115e-17
0.1800 5.551115e-17
0.2000 5.551115e-17
cells error_tracer
1024 3.349625e-03
1024 6.854865e-03
1024 9.880108e-03
1024 1.371541e-02
1024 1.649349e-02
1024 1.933325e-02
1024 2.272922e-02
1024 2.487775e-02
1024 2.768088e-02
1024 3.055888e-02
198 changes: 198 additions & 0 deletions applications_tests/lethe-fluid/dg_tracer_advection_tanh.prm
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
# Listing of Parameters
#----------------------

set dimension = 2

#---------------------------------------------------
# Simulation Control
#---------------------------------------------------

subsection simulation control
set method = bdf1
set number mesh adapt = 0
set time end = 0.2
set time step = 0.02
set output name = stab_tracer
set output frequency = 0
end

#---------------------------------------------------
# FEM
#---------------------------------------------------

subsection FEM
set velocity order = 1
set pressure order = 1
set tracer order = 1
set tracer uses dg = true
end

#---------------------------------------------------
# Timer
#---------------------------------------------------

subsection timer
set type = none # <none|iteration|end>
end

#---------------------------------------------------
# Initial condition
#---------------------------------------------------

subsection initial conditions
set type = nodal
subsection uvwp
set Function expression = 1; 0; 0
end
subsection tracer
set Function expression = tanh(25-50*x) #if (x<=0.5,1,0)
end
end

#---------------------------------------------------
# Physical Properties
#---------------------------------------------------

subsection physical properties
set number of fluids = 1
subsection fluid 0
set tracer diffusivity = 0
end
end

#---------------------------------------------------
# Mesh
#---------------------------------------------------

subsection mesh
set type = dealii
set grid type = subdivided_hyper_rectangle
set grid arguments = 1, 1 : 0, 0 : 1, 1.0 : true
set initial refinement = 5
end

#---------------------------------------------------
# Multiphysics
#---------------------------------------------------

subsection multiphysics
set tracer = true
end

#---------------------------------------------------
# Mesh Adaptation Control
#---------------------------------------------------

subsection mesh adaptation
set type = none
end

#---------------------------------------------------
# Analytical Solution
#---------------------------------------------------

subsection analytical solution
set enable = true
set verbosity = verbose
subsection uvwp
set Function expression = 1 ; 0 ; 0
end
subsection tracer
set Function expression = tanh(25-50*x+50*t)
end
end

#---------------------------------------------------
# Boundary Conditions
#---------------------------------------------------

subsection boundary conditions
set number = 3
subsection bc 0
set id = 0
set type = function
subsection u
set Function expression = 1
end
end
subsection bc 1
set id = 2
set type = slip
end
subsection bc 2
set id = 3
set type = slip
end
end


subsection boundary conditions tracer
set number = 4
subsection bc 0
set id = 0
set type = dirichlet
subsection dirichlet
set Function expression = 1
end
end
subsection bc 1
set id = 1
set type = outlet
end
subsection bc 2
set id = 2
set type = outlet
end
subsection bc 3
set id = 3
set type = outlet
end
end


#---------------------------------------------------
# Non-Linear Solver Control
#---------------------------------------------------

subsection non-linear solver
subsection tracer
set verbosity = quiet
set tolerance = 1e-9
set max iterations = 1
end
subsection fluid dynamics
set verbosity = quiet
set tolerance = 1e-9
set max iterations = 1
end
end

#---------------------------------------------------
# Linear Solver Control
#---------------------------------------------------

subsection linear solver
subsection fluid dynamics
set verbosity = quiet
set method = gmres
set max iters = 100
set relative residual = 1e-13
set minimum residual = 1e-14
set preconditioner = ilu
set ilu preconditioner fill = 0
set ilu preconditioner absolute tolerance = 1e-14
set ilu preconditioner relative tolerance = 1.00
end
subsection tracer
set verbosity = quiet
set method = gmres
set max iters = 300
set max krylov vectors = 300
set relative residual = 1e-9
set minimum residual = 1e-9
set preconditioner = ilu
set ilu preconditioner fill = 0
set ilu preconditioner absolute tolerance = 1e-14
set ilu preconditioner relative tolerance = 1.00
end
end

0 comments on commit d954dfd

Please sign in to comment.