Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-fem-dg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dune-fem
dune-fem-dg
Commits
a7c12b40
Commit
a7c12b40
authored
6 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
make sod the same as in euler/examples.
parent
932ef34d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Latest features added to dune-fem-dg.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pydemo/euler/euler.py
+2
-2
2 additions, 2 deletions
pydemo/euler/euler.py
pydemo/euler/paramSolver
+1
-1
1 addition, 1 deletion
pydemo/euler/paramSolver
pydemo/euler/shock_tube.py
+7
-6
7 additions, 6 deletions
pydemo/euler/shock_tube.py
with
10 additions
and
9 deletions
pydemo/euler/euler.py
+
2
−
2
View file @
a7c12b40
...
...
@@ -80,10 +80,10 @@ def sod(dim,gamma):
space
=
Space
(
dim
,
dim
+
2
)
x
=
SpatialCoordinate
(
space
.
cell
())
return
CompressibleEulerNeuman
(
dim
,
gamma
)
,
\
riemanProblem
(
x
[
0
],
0.
,
riemanProblem
(
x
[
0
],
0.
5
,
CompressibleEuler
(
dim
,
gamma
).
toCons
([
1
,
0
,
0
,
1
]),
CompressibleEuler
(
dim
,
gamma
).
toCons
([
0.125
,
0
,
0
,
0.1
])),
\
[
-
1
,
0
],
[
1
,
0.
1
],
[
50
,
5
],
\
[
0
,
0
],
[
1
,
0.
25
],
[
64
,
16
],
\
"
sod
"
def
radialSod1
(
dim
,
gamma
):
space
=
Space
(
dim
,
dim
+
2
)
...
...
This diff is collapsed.
Click to expand it.
pydemo/euler/paramSolver
+
1
−
1
View file @
a7c12b40
...
...
@@ -2,7 +2,7 @@
#---------------------
fem.ode.odesolver: EX # ode solvers: EX, IM, IMEX
fem.ode.order:
2
fem.ode.order:
3
fem.ode.verbose: full # ode output: none, cfl, full
fem.ode.cflincrease: 1.25
fem.ode.miniterations: 95
...
...
This diff is collapsed.
Click to expand it.
pydemo/euler/shock_tube.py
+
7
−
6
View file @
a7c12b40
...
...
@@ -10,7 +10,7 @@ from ufl import *
gamma
=
1.4
dim
=
2
# from euler import sod as problem
from
euler
import
radialS
od
3
as
problem
from
euler
import
s
od
as
problem
Model
,
initial
,
x0
,
x1
,
N
,
name
=
problem
(
dim
,
gamma
)
...
...
@@ -19,13 +19,12 @@ parameter.append({"fem.verboserank": -1})
grid
=
structuredGrid
(
x0
,
x1
,
N
)
# grid = create.grid("ALUSimplex", cartesianDomain(x0,x1,N))
dimR
=
4
dimR
=
grid
.
dimension
+
2
t
=
0
dt
=
1e-5
saveStep
=
0.01
saveTime
=
saveStep
count
=
0
endTime
=
0.
4
endTime
=
0.
15
def
initialize
(
space
):
lagOrder
=
1
# space.order
...
...
@@ -69,14 +68,15 @@ def useGalerkinOp():
print
(
"
time loop:
"
,
time
.
time
()
-
start
)
def
useODESolver
():
global
count
,
t
,
dt
,
saveTime
global
count
,
t
,
saveTime
dt
=
1e-3
spaceName
=
"
dgonb
"
polOrder
=
2
space
=
create
.
space
(
spaceName
,
grid
,
order
=
polOrder
,
dimrange
=
dimR
)
u_h
=
initialize
(
space
)
u_h_n
=
u_h
.
copy
(
name
=
"
previous
"
)
rho
,
v
,
p
=
Model
.
toPrim
(
u_h
)
operator
=
createFemDGSolver
(
Model
,
space
,
limiter
=
None
)
operator
=
createFemDGSolver
(
Model
,
space
)
#
, limiter=None )
# operator.setTimeStepSize(dt)
start
=
time
.
time
()
...
...
@@ -94,6 +94,7 @@ def useODESolver():
if
t
>
saveTime
:
print
(
'
dt =
'
,
dt
,
'
time =
'
,
t
,
'
count =
'
,
count
)
count
+=
1
rho
,
v
,
p
=
Model
.
toPrim
(
u_h
)
grid
.
writeVTK
(
name
,
pointdata
=
[
u_h
],
celldata
=
{
"
density
"
:
rho
,
"
pressure
"
:
p
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment