Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
c5b7fccb
Commit
c5b7fccb
authored
6 years ago
by
Fanny CHOPOT
Browse files
Options
Downloads
Patches
Plain Diff
fonctionnement code pour diffusion pure avec transfert thermique OK
parent
8cfd476b
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main.cpp
+1
-0
1 addition, 0 deletions
src/main.cpp
src/scheme/FiniteVolumesDiffusion.hpp
+14
-17
14 additions, 17 deletions
src/scheme/FiniteVolumesDiffusion.hpp
src/scheme/FiniteVolumesEulerUnknowns.hpp
+1
-1
1 addition, 1 deletion
src/scheme/FiniteVolumesEulerUnknowns.hpp
with
16 additions
and
18 deletions
src/main.cpp
+
1
−
0
View file @
c5b7fccb
...
@@ -646,6 +646,7 @@ int main(int argc, char *argv[])
...
@@ -646,6 +646,7 @@ int main(int argc, char *argv[])
}
}
}
}
/*
/*
{ // gnuplot output for entropy (gaz parfait en prenant cv = 1))
{ // gnuplot output for entropy (gaz parfait en prenant cv = 1))
const Kokkos::View<const Rd*> xj = mesh_data.xj();
const Kokkos::View<const Rd*> xj = mesh_data.xj();
...
...
This diff is collapsed.
Click to expand it.
src/scheme/FiniteVolumesDiffusion.hpp
+
14
−
17
View file @
c5b7fccb
...
@@ -140,6 +140,7 @@ private:
...
@@ -140,6 +140,7 @@ private:
m_Fl(0,0) = -(t/((50./9.)-t*t))*h*x0[0][0];
m_Fl(0,0) = -(t/((50./9.)-t*t))*h*x0[0][0];
m_Fl(m_mesh.numberOfFaces()-1,0) = -(t/((50./9.)-t*t))*h*xmax[0][0];
m_Fl(m_mesh.numberOfFaces()-1,0) = -(t/((50./9.)-t*t))*h*xmax[0][0];
*/
*/
return
m_Fl
;
return
m_Fl
;
}
}
...
@@ -344,7 +345,7 @@ public:
...
@@ -344,7 +345,7 @@ public:
sum1
+=
nuj
(
cell_nodes
(
j
,
m
));
sum1
+=
nuj
(
cell_nodes
(
j
,
m
));
}
}
if
(
sum
<
sum1
)
{
if
(
sum
>
sum1
)
{
if
(
sum
==
0.
)
{
if
(
sum
==
0.
)
{
dt_j
[
j
]
=
std
::
numeric_limits
<
double
>::
max
();
dt_j
[
j
]
=
std
::
numeric_limits
<
double
>::
max
();
}
else
{
}
else
{
...
@@ -396,6 +397,10 @@ public:
...
@@ -396,6 +397,10 @@ public:
const
Kokkos
::
View
<
const
double
*>
Vj
=
m_mesh_data
.
Vj
();
const
Kokkos
::
View
<
const
double
*>
Vj
=
m_mesh_data
.
Vj
();
const
Kokkos
::
View
<
const
Rd
**>
Cjr
=
m_mesh_data
.
Cjr
();
const
Kokkos
::
View
<
const
Rd
**>
Cjr
=
m_mesh_data
.
Cjr
();
double
pi
=
4.
*
std
::
atan
(
1.
);
TR
(
0
)
=
2
-
0.5
*
pi
*
pi
*
(
std
::
exp
(
-
2.
*
t
)
-
1.
);
// la condition au bord a droite de T depend du temps
// Calcule les flux
// Calcule les flux
computeExplicitFluxes
(
uj
,
Cjr
,
kj
,
uL
,
uR
,
kL
,
kR
,
Tj
,
nuj
,
TL
,
TR
,
nuL
,
nuR
,
t
);
computeExplicitFluxes
(
uj
,
Cjr
,
kj
,
uL
,
uR
,
kL
,
kR
,
Tj
,
nuj
,
TL
,
TR
,
nuL
,
nuR
,
t
);
...
@@ -409,8 +414,6 @@ public:
...
@@ -409,8 +414,6 @@ public:
const
Kokkos
::
View
<
const
unsigned
int
*
[
2
]
>&
cell_faces
const
Kokkos
::
View
<
const
unsigned
int
*
[
2
]
>&
cell_faces
=
m_connectivity
.
cellFaces
();
=
m_connectivity
.
cellFaces
();
double
pi
=
4.
*
std
::
atan
(
1.
);
// Mise a jour de la vitesse et de l'energie totale specifique
// Mise a jour de la vitesse et de l'energie totale specifique
const
Kokkos
::
View
<
const
double
*>
inv_mj
=
unknowns
.
invMj
();
const
Kokkos
::
View
<
const
double
*>
inv_mj
=
unknowns
.
invMj
();
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
)
{
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
)
{
...
@@ -447,17 +450,11 @@ public:
...
@@ -447,17 +450,11 @@ public:
ej
[
j
]
=
Ej
[
j
]
-
0.5
*
(
uj
[
j
],
uj
[
j
]);
ej
[
j
]
=
Ej
[
j
]
-
0.5
*
(
uj
[
j
],
uj
[
j
]);
});
});
// met a jour les quantites (geometriques) associees au maillage
// Calcul de T par la formule T = E-0.5 u^2
//m_mesh_data.updateAllData();
/*
// Calcul de rho avec la formule Mj = Vj rhoj
const Kokkos::View<const double*> mj = unknowns.mj();
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
)
{
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
)
{
rhoj[j] = mj[j]/Vj[j];
Tj
[
j
]
=
Ej
[
j
]
-
0.5
*
(
uj
[
j
],
uj
[
j
]);
});
});
*/
}
}
// Calcul erreur entre solution analytique et solution numerique en norme L2
// Calcul erreur entre solution analytique et solution numerique en norme L2
...
...
This diff is collapsed.
Click to expand it.
src/scheme/FiniteVolumesEulerUnknowns.hpp
+
1
−
1
View file @
c5b7fccb
...
@@ -456,7 +456,7 @@ public:
...
@@ -456,7 +456,7 @@ public:
});
});
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
){
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
){
m_Tj
[
j
]
=
2
-
0.5
*
std
::
sin
(
pi
*
xj
[
j
][
0
])
*
std
::
sin
(
pi
*
xj
[
j
][
0
]);
// k = x
m_Tj
[
j
]
=
2
.
-
0.5
*
std
::
sin
(
pi
*
xj
[
j
][
0
])
*
std
::
sin
(
pi
*
xj
[
j
][
0
]);
// k = x
});
});
// Conditions aux bords de Dirichlet sur T et nu
// Conditions aux bords de Dirichlet sur T et nu
...
...
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