Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ddm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gmsh
ddm
Commits
356e700e
Commit
356e700e
authored
3 years ago
by
Marchner
Browse files
Options
Downloads
Patches
Plain Diff
update example
parent
45aae644
No related branches found
No related tags found
No related merge requests found
Pipeline
#8998
passed
3 years ago
Stage: gmshfem
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/helmholtzflow/Nacelle/main.cpp
+5
-8
5 additions, 8 deletions
examples/helmholtzflow/Nacelle/main.cpp
with
5 additions
and
8 deletions
examples/helmholtzflow/Nacelle/main.cpp
+
5
−
8
View file @
356e700e
...
...
@@ -28,7 +28,7 @@ int main(int argc, char **argv)
{
GmshDdm
gmshDdm
(
argc
,
argv
);
int
ElemOrder
=
4
;
// mesh order
int
ElemOrder
=
2
;
// mesh order
double
h_near
=
0.03
;
double
h_far
=
0.04
;
double
Lx
=
3.
;
...
...
@@ -125,7 +125,7 @@ int main(int argc, char **argv)
gmsh
::
model
::
mesh
::
setOrder
(
ElemOrder
);
gmsh
::
write
(
"nacelle_post.msh"
);
bool
saveFlow
=
0
;
bool
saveFlow
=
1
;
// Compute mean flow properties, Poisson problem
// Mean flow parameters
double
gamma0
=
1.4
;
...
...
@@ -190,10 +190,7 @@ int main(int argc, char **argv)
rho0
=
rho_inf
*
pow
(
(
1
+
(
gamma0
-
1
)
/
2.
*
(
v_inf
*
v_inf
-
v
*
v
)
/
(
c_inf
*
c_inf
)
),
1
/
(
gamma0
-
1
)
);
if
(
saveFlow
)
{
save
(
rho0
,
omegaFlow
,
"rho0"
);
save
(
c0
,
omegaFlow
,
"c0"
);
save
(
M0x
,
omegaFlow
,
"Mx"
);
save
(
M0y
,
omegaFlow
,
"My"
);
save
(
sqrt
(
M0x
*
M0x
+
M0y
*
M0y
),
omegaFlow
,
"Mach"
+
std
::
to_string
(
ElemOrder
));
}
// DDM problem
...
...
@@ -223,7 +220,7 @@ int main(int argc, char **argv)
getInputMode
(
m
,
n
,
w
/
cf
,
Mf
,
kx
,
ky
,
psi
,
dy_psi
,
dz_psi
,
2
);
msg
::
info
<<
"propagative wavenumber kx = "
<<
kx
<<
", transverse wavenumber ky = "
<<
ky
<<
msg
::
endl
;
float
pointsByWl
=
(
2
*
pi
*
FEMorder
*
c
_in
f
*
(
1
-
abs
(
Mf
)
)
)
/
(
h_
f
ar
*
w
);
float
pointsByWl
=
(
2
*
pi
*
FEMorder
*
cf
*
(
1
-
abs
(
Mf
)
)
)
/
(
h_
ne
ar
*
w
);
msg
::
info
<<
" - FEM basis order = "
<<
FEMorder
<<
""
<<
msg
::
endl
;
msg
::
info
<<
" - Approx. dofs by wavelength at fan Face = "
<<
pointsByWl
<<
msg
::
endl
;
...
...
@@ -311,7 +308,7 @@ int main(int argc, char **argv)
// convected Helmholz weak form
formulation
(
i
).
integral
(
rho0S
*
vector
<
std
::
complex
<
double
>
>
(
1
-
Mx
*
Mx
,
-
Mx
*
My
,
0.
)
*
grad
(
dof
(
u
(
i
))),
vector
<
std
::
complex
<
double
>
>
(
1.
,
0.
,
0.
)
*
grad
(
tf
(
u
(
i
))),
omega_phy
(
i
),
gauss
);
formulation
(
i
).
integral
(
rho0S
*
vector
<
std
::
complex
<
double
>
>
(
-
Mx
*
My
,
1
-
My
*
My
,
0.
)
*
grad
(
dof
(
u
(
i
))),
vector
<
std
::
complex
<
double
>
>
(
0.
,
1.
,
0.
)
*
grad
(
tf
(
u
(
i
))),
omega_phy
(
i
),
gauss
);
formulation
(
i
).
integral
(
rho0S
*
dof
(
u
(
i
)),
vector
<
std
::
complex
<
double
>
>
(
-
im
*
k0
*
Mx
,
-
im
*
k0
*
My
,
0.
)
*
grad
(
tf
(
u
(
i
))),
omega_phy
(
i
),
gauss
,
term
::
ProductType
::
Scalar
);
formulation
(
i
).
integral
(
-
im
*
k0
*
rho0S
*
dof
(
u
(
i
)),
vector
<
std
::
complex
<
double
>
>
(
Mx
,
My
,
0.
)
*
grad
(
tf
(
u
(
i
))),
omega_phy
(
i
),
gauss
);
formulation
(
i
).
integral
(
rho0S
*
vector
<
std
::
complex
<
double
>
>
(
im
*
k0
*
Mx
,
im
*
k0
*
My
,
0.
)
*
grad
(
dof
(
u
(
i
))),
tf
(
u
(
i
)),
omega_phy
(
i
),
gauss
);
formulation
(
i
).
integral
(
-
rho0S
*
k0
*
k0
*
dof
(
u
(
i
)),
tf
(
u
(
i
)),
omega_phy
(
i
),
gauss
);
formulation
(
i
).
integral
(
+
rho0S
*
(
m
*
m
)
/
(
y
<
std
::
complex
<
double
>
>
()
*
y
<
std
::
complex
<
double
>
>
()
)
*
dof
(
u
(
i
)),
tf
(
u
(
i
)),
omega_phy
(
i
),
gauss
);
...
...
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