Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moose
Manage
Activity
Members
Labels
Plan
Issues
9
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sahil Moza
moose
Commits
118484ec
Commit
118484ec
authored
8 years ago
by
Asia Jędrzejewska-Szmek
Browse files
Options
Downloads
Patches
Plain Diff
Fix errors in volume calculation
parent
08f2e43a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!205
DifShell and DifBuffer implementation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
moose-core/biophysics/DifShell.cpp
+12
-11
12 additions, 11 deletions
moose-core/biophysics/DifShell.cpp
with
12 additions
and
11 deletions
moose-core/biophysics/DifShell.cpp
+
12
−
11
View file @
118484ec
...
...
@@ -205,7 +205,7 @@ double DifShell::vGetThickness(const Eref& e) const
return
thickness_
;
}
void
DifShell
::
vSetVolume
(
const
Eref
&
e
,
double
volume
)
void
DifShell
::
vSetVolume
(
const
Eref
&
e
,
double
volume
)
{
if
(
shapeMode_
!=
3
)
cerr
<<
"Warning: DifShell: Trying to set volume, when shapeMode is not USER-DEFINED
\n
"
;
...
...
@@ -278,9 +278,10 @@ void DifShell::vReinit( const Eref& e, ProcPtr p )
dCbyDt_
=
leak_
;
Cmultiplier_
=
0
;
C_
=
Ceq_
;
const
double
dOut
=
diameter_
;
const
double
dIn
=
diameter_
-
thickness_
;
const
double
rOut
=
diameter_
/
2.
;
const
double
rIn
=
rOut
-
thickness_
;
switch
(
shapeMode_
)
{
/*
...
...
@@ -288,13 +289,13 @@ void DifShell::vReinit( const Eref& e, ProcPtr p )
*/
case
0
:
if
(
length_
==
0.0
)
{
// Spherical shell
volume_
=
(
M_PI
/
6.0
)
*
(
d
Out
*
d
Out
*
d
Out
-
d
In
*
d
In
*
d
In
);
outerArea_
=
M_PI
*
d
Out
*
d
Out
;
innerArea_
=
M_PI
*
d
In
*
d
In
;
volume_
=
4.
/
3.
*
M_PI
*
(
r
Out
*
r
Out
*
r
Out
-
r
In
*
r
In
*
r
In
);
outerArea_
=
4
*
M_PI
*
r
Out
*
r
Out
;
innerArea_
=
4
*
M_PI
*
r
In
*
r
In
;
}
else
{
// Cylindrical shell
volume_
=
(
M_PI
*
length_
/
4.0
)
*
(
d
Out
*
d
Out
-
d
In
*
d
In
);
outerArea_
=
M_PI
*
d
Out
*
length_
;
innerArea_
=
M_PI
*
d
In
*
length_
;
volume_
=
(
M_PI
*
length_
)
*
(
r
Out
*
r
Out
-
r
In
*
r
In
);
outerArea_
=
2
*
M_PI
*
r
Out
*
length_
;
innerArea_
=
2
*
M_PI
*
r
In
*
length_
;
}
break
;
...
...
@@ -360,7 +361,7 @@ void DifShell::vFluxFromOut(const Eref& e, double outerC, double outerThickness
* We could pre-compute ( D / Volume ), but let us leave the optimizations
* for the solver.
*/
//cout << "FluxFromOut "<<outerC<<" "<<outerThickness;
dCbyDt_
+=
diff
*
outerC
;
Cmultiplier_
+=
diff
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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