Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Julia
Nektar
Commits
217f2c2a
Commit
217f2c2a
authored
Jan 22, 2014
by
Chris Cantwell
Browse files
Merge branch 'fix/AeroForcesRelease' of /opt/gitlab/repositories/nektar
parents
25dcf024
52596729
Changes
1
Hide whitespace changes
Inline
Side-by-side
library/SolverUtils/Filters/FilterAeroForces.cpp
View file @
217f2c2a
...
...
@@ -175,9 +175,27 @@ namespace Nektar
{
// Open output stream
m_outputStream
.
open
(
m_outputFile
.
c_str
());
m_outputStream
<<
"# Time
\t
Fx (press)
\t
Fx (visc)
\t
Fx (tot)
\t
"
" Fy (press)
\t
Fy (visc)
\t
Fy (tot)
\t
"
" Fz (press)
\t
Fz (visc)
\t
Fz (tot)
\t
"
;
m_outputStream
<<
"#"
;
m_outputStream
.
width
(
7
);
m_outputStream
<<
"Time"
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
"Fx (press)"
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
"Fx (visc)"
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
"Fx (tot)"
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
"Fy (press)"
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
"Fy (visc)"
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
"Fy (tot)"
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
"Fz (press)"
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
"Fz (visc)"
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
"Fz (tot)"
;
m_outputStream
<<
endl
;
}
...
...
@@ -280,9 +298,9 @@ namespace Nektar
// points for each element (hence local).
for
(
int
j
=
0
;
j
<
dim
;
++
j
)
{
gradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
);
gradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
);
gradW
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
);
gradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
,
0.0
);
gradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
,
0.0
);
gradW
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
,
0.0
);
}
// identify boundary of element
...
...
@@ -305,20 +323,20 @@ namespace Nektar
int
nbc
=
bc
->
GetTotPoints
();
// several vectors for computing the forces
Array
<
OneD
,
NekDouble
>
Pb
(
nbc
);
Array
<
OneD
,
NekDouble
>
Pb
(
nbc
,
0.0
);
for
(
int
j
=
0
;
j
<
dim
;
++
j
)
{
fgradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
);
fgradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
);
fgradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
,
0.0
);
fgradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
,
0.0
);
}
Array
<
OneD
,
NekDouble
>
drag_t
(
nbc
);
Array
<
OneD
,
NekDouble
>
lift_t
(
nbc
);
Array
<
OneD
,
NekDouble
>
drag_p
(
nbc
);
Array
<
OneD
,
NekDouble
>
lift_p
(
nbc
);
Array
<
OneD
,
NekDouble
>
temp
(
nbc
);
Array
<
OneD
,
NekDouble
>
temp2
(
nbc
);
Array
<
OneD
,
NekDouble
>
drag_t
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
lift_t
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
drag_p
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
lift_p
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
temp
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
temp2
(
nbc
,
0.0
);
// identify boundary of element .
boundary
=
BoundarytoTraceID
[
cnt
];
...
...
@@ -442,9 +460,9 @@ namespace Nektar
// points for each element (hence local).
for
(
int
j
=
0
;
j
<
dim
;
++
j
)
{
gradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
);
gradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
);
gradW
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
);
gradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
,
0.0
);
gradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
,
0.0
);
gradW
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
,
0.0
);
}
//identify boundary of element
...
...
@@ -469,24 +487,24 @@ namespace Nektar
int
nbc
=
bc
->
GetTotPoints
();
//several vectors for computing the forces
Array
<
OneD
,
NekDouble
>
Pb
(
nbc
);
Array
<
OneD
,
NekDouble
>
Pb
(
nbc
,
0.0
);
for
(
int
j
=
0
;
j
<
dim
;
++
j
)
{
fgradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
);
fgradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
);
fgradW
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
);
fgradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
,
0.0
);
fgradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
,
0.0
);
fgradW
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
,
0.0
);
}
Array
<
OneD
,
NekDouble
>
drag_t
(
nbc
);
Array
<
OneD
,
NekDouble
>
lift_t
(
nbc
);
Array
<
OneD
,
NekDouble
>
side_t
(
nbc
);
Array
<
OneD
,
NekDouble
>
drag_p
(
nbc
);
Array
<
OneD
,
NekDouble
>
lift_p
(
nbc
);
Array
<
OneD
,
NekDouble
>
side_p
(
nbc
);
Array
<
OneD
,
NekDouble
>
temp
(
nbc
);
Array
<
OneD
,
NekDouble
>
temp2
(
nbc
);
Array
<
OneD
,
NekDouble
>
drag_t
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
lift_t
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
side_t
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
drag_p
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
lift_p
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
side_p
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
temp
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
temp2
(
nbc
,
0.0
);
// identify boundary of element .
boundary
=
BoundarytoTraceID
[
cnt
];
...
...
@@ -638,8 +656,8 @@ namespace Nektar
for
(
int
j
=
0
;
j
<
dim
;
++
j
)
{
gradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
);
gradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
);
gradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
,
0.0
);
gradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nq
,
0.0
);
}
boundary
=
BoundarytoTraceID
[
cnt
];
...
...
@@ -655,13 +673,13 @@ namespace Nektar
::
Expansion1D
>
(
BndExp
[
n
]
->
GetExp
(
i
));
int
nbc
=
bc
->
GetTotPoints
();
Array
<
OneD
,
NekDouble
>
Pb
(
nbc
);
Array
<
OneD
,
NekDouble
>
Pb
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
drag_t
(
nbc
);
Array
<
OneD
,
NekDouble
>
lift_t
(
nbc
);
Array
<
OneD
,
NekDouble
>
drag_p
(
nbc
);
Array
<
OneD
,
NekDouble
>
lift_p
(
nbc
);
Array
<
OneD
,
NekDouble
>
temp
(
nbc
);
Array
<
OneD
,
NekDouble
>
drag_t
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
lift_t
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
drag_p
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
lift_p
(
nbc
,
0.0
);
Array
<
OneD
,
NekDouble
>
temp
(
nbc
,
0.0
);
boundary
=
BoundarytoTraceID
[
cnt
];
...
...
@@ -669,8 +687,8 @@ namespace Nektar
for
(
int
j
=
0
;
j
<
dim
;
++
j
)
{
fgradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
);
fgradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
);
fgradU
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
,
0.0
);
fgradV
[
j
]
=
Array
<
OneD
,
NekDouble
>
(
nbc
,
0.0
);
}
...
...
@@ -746,7 +764,7 @@ namespace Nektar
m_outputStream
.
width
(
25
);
m_outputStream
<<
setprecision
(
8
)
<<
Fxv
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
setprecision
(
16
)
<<
Fx
;
m_outputStream
<<
setprecision
(
8
)
<<
Fx
;
m_outputStream
.
width
(
25
);
m_outputStream
<<
setprecision
(
8
)
<<
Fyp
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment