Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Aerospace and Mechanical Engineering
blaster
Commits
0ae3f0e9
Verified
Commit
0ae3f0e9
authored
2 months ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
(fix) Small changes for fuselage
parent
865165a7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
blast/src/blDriver.cpp
+4
-12
4 additions, 12 deletions
blast/src/blDriver.cpp
blast/src/blSection.cpp
+4
-7
4 additions, 7 deletions
blast/src/blSection.cpp
with
8 additions
and
19 deletions
blast/src/blDriver.cpp
+
4
−
12
View file @
0ae3f0e9
...
...
@@ -3,11 +3,6 @@
#include
"blSolver.h"
#include
<iomanip>
#define ANSI_COLOR_RED "\x1b[1;31m"
#define ANSI_COLOR_GREEN "\x1b[1;32m"
#define ANSI_COLOR_YELLOW "\x1b[1;33m"
#define ANSI_COLOR_RESET "\x1b[0m"
using
namespace
blast
;
/**
...
...
@@ -90,19 +85,16 @@ int Driver::run()
maxMach
=
reg
->
getMaxMach
();
// Reset transition
if
(
reg
->
getName
()
==
"wake"
)
if
(
reg
->
getName
()
==
"wake"
||
reg
->
getName
()
==
"fuselage"
)
reg
->
setxtr
(
0.
);
else
if
(
reg
->
getName
()
==
"upper"
||
reg
->
getName
()
==
"lower"
)
reg
->
setxtr
(
1.
);
else
{
std
::
cout
<<
"reg->getName() "
<<
reg
->
getName
()
<<
std
::
endl
;
throw
std
::
runtime_error
(
"Wrong region name
\n
"
);
}
throw
std
::
runtime_error
(
"Didn't expect region name: "
+
reg
->
getName
());
// Reset regime.
lockTrans
=
false
;
if
(
reg
->
getName
()
==
"upper"
||
reg
->
getName
()
==
"lower"
)
if
(
reg
->
getName
()
==
"upper"
||
reg
->
getName
()
==
"lower"
||
reg
->
getName
()
==
"fuselage"
)
{
for
(
auto
&
nod
:
reg
->
nodes
)
nod
->
setRegime
(
0
);
...
...
@@ -122,7 +114,7 @@ int Driver::run()
lockTrans
=
true
;
}
else
throw
std
::
runtime_error
(
"
Wrong region name
\n
"
);
throw
std
::
runtime_error
(
"
Didn't expect region name: "
+
reg
->
getName
()
);
// Loop over points
for
(
size_t
inod
=
1
;
inod
<
reg
->
getnNodes
();
++
inod
)
...
...
This diff is collapsed.
Click to expand it.
blast/src/blSection.cpp
+
4
−
7
View file @
0ae3f0e9
...
...
@@ -143,14 +143,11 @@ void Section::computeDrag()
else
{
// Loop on "upper" "lower" string
for
(
std
::
string
name
:
{
"upper"
,
"lower"
}
)
for
(
auto
&
reg
:
regions
)
{
int
regionId
=
this
->
getRegionIdByName
(
name
);
if
(
regionId
!=
-
1
)
std
::
runtime_error
(
"Region not found"
);
size_t
lastPt
=
(
regions
[
regionId
]
->
getnNodes
()
-
1
)
*
nVar
;
Cdt
+=
regions
[
regionId
]
->
u
[
lastPt
+
0
]
*
pow
(
regions
[
regionId
]
->
u
[
lastPt
+
3
],
(
regions
[
regionId
]
->
u
[
lastPt
+
1
]
+
5
)
/
2
);
size_t
lastPt
=
(
reg
->
getnNodes
()
-
1
)
*
nVar
;
Cdt
+=
reg
->
u
[
lastPt
+
0
]
*
pow
(
reg
->
u
[
lastPt
+
3
],
(
reg
->
u
[
lastPt
+
1
]
+
5
)
/
2
);
}
}
// Pressure drag coefficient.
...
...
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