Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
888f2a4d
There was an error fetching the commit references. Please try again later.
Commit
888f2a4d
authored
6 years ago
by
Jan Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
dodelanz tokz pro jednotlive rovnice, neyasayedo do rovnic, jen hustota.
parent
3008a6e7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/inviscid-flow-sw/UpwindMomentumBase.h
+12
-12
12 additions, 12 deletions
examples/inviscid-flow-sw/UpwindMomentumBase.h
with
12 additions
and
12 deletions
examples/inviscid-flow-sw/UpwindMomentumBase.h
+
12
−
12
View file @
888f2a4d
...
...
@@ -77,35 +77,35 @@ class UpwindMomentumBase
else
if
(
machNumber
<=
1.0
)
return
density
*
speedOfSound
*
speedOfSound
/
(
2
*
this
->
gamma
)
*
(
(
machNumber
-
1.0
)
*
machNumber
+
(
-
machNumber
+
1.0
);
else
return
density
*
velocity
*
velocity
*
pressure
;
return
density
*
velocity
*
velocity
+
pressure
;
}
const
RealType
&
positiveOtherMomentumFlux
(
const
RealType
&
density
,
const
RealType
&
velocity
,
const
RealType
&
pressure
)
const
RealType
&
positiveOtherMomentumFlux
(
const
RealType
&
density
,
const
RealType
&
velocity
_main
,
const
RealType
&
velocity_other
,
const
RealType
&
pressure
)
{
const
RealType
&
speedOfSound
=
std
::
sqrt
(
this
->
gamma
*
pressure
/
density
);
const
RealType
&
machNumber
=
velocity
/
speedOfSound
;
const
RealType
&
machNumber
=
velocity
_main
/
speedOfSound
;
if
(
machNumber
<=
-
1.0
)
return
0
;
else
if
(
machNumber
<=
0.0
)
return
density
*
speedOfSound
/
(
2
*
this
->
gamma
)
*
(
machNumber
+
1.0
);
return
density
*
speedOfSound
*
speedOfSound
/
(
2
*
this
->
gamma
)
*
(
machNumber
+
1.0
)
*
velocity_other
/
speedOfSound
;
else
if
(
machNumber
<=
1.0
)
return
density
*
speedOfSound
/
(
2
*
this
->
gamma
)
*
(
(
2.0
*
this
->
gamma
-
1.0
)
*
machNumber
+
1.0
);
return
density
*
speedOfSound
*
speedOfSound
/
(
2
*
this
->
gamma
)
*
(
(
2.0
*
this
->
gamma
-
1.0
)
*
machNumber
+
1.0
)
*
velocity_other
/
speedOfSound
;
else
return
density
*
velocity
;
return
density
*
velocity
_main
*
velocity_other
;
}
const
RealType
&
negativeOtherMomentumFlux
(
const
RealType
&
density
,
const
RealType
&
velocity
,
const
RealType
&
pressure
)
const
RealType
&
negativeOtherMomentumFlux
(
const
RealType
&
density
,
const
RealType
&
velocity
_main
,
const
RealType
&
velocity_other
,
const
RealType
&
pressure
)
{
const
RealType
&
speedOfSound
=
std
::
sqrt
(
this
->
gamma
*
pressure
/
density
);
const
RealType
&
machNumber
=
velocity
/
speedOfSound
;
const
RealType
&
machNumber
=
velocity
_main
/
speedOfSound
;
if
(
machNumber
<=
-
1.0
)
return
density
*
velocity
;
return
density
*
velocity
_main
*
velocity_other
;
else
if
(
machNumber
<=
0.0
)
return
density
*
speedOfSound
/
(
2
*
this
->
gamma
)
*
(
(
2.0
*
this
->
gamma
-
1.0
)
*
machNumber
-
1.0
);
return
density
*
speedOfSound
*
speedOfSound
/
(
2
*
this
->
gamma
)
*
(
(
2.0
*
this
->
gamma
-
1.0
)
*
machNumber
+
1.0
)
*
velocity_other
/
speedOfSound
;
else
if
(
machNumber
<=
1.0
)
return
density
*
speedOfSound
/
(
2
*
this
->
gamma
)
*
(
machNumber
-
1.0
);
return
density
*
speedOfSound
*
speedOfSound
/
(
2
*
this
->
gamma
)
*
(
machNumber
+
1.0
)
*
velocity_other
/
speedOfSound
;
else
return
density
*
velocity
;
return
0
;
}
protected
:
...
...
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