Commit 6e7c0ebd authored by Lambert Theisen's avatar Lambert Theisen 🚀

Add div(u) term to energy equation (heat)

- density formulation has no prob
- but pressure formulation is then non (anti-)symmetric
- therefore use mass balance to eliminate div(u)=f_mass from LHS of energy equation to remain (a-)sym
- This needs the removal of unneeded mass source from heat testcases
- Also needs adapting R13 cases such that for mass source, the same energy source is applied s.t. energy equation remains equal
  - The latter is actually only needed to compare with WK19 where div(u) was inconsistently neglected
parent 16c01e27
......@@ -641,7 +641,8 @@ class Solver:
n(r) * bcs[bc]["theta_w"] * df.ds(bc)
for bc in bcs.keys()
])
rhs[1] = f_heat * kappa * df.dx
# Use div(u)=f_mass to remain sym. (density-form doesnt need this):
rhs[1] = (f_heat-f_mass) * kappa * df.dx
rhs[2] = - sum([
nt(psi) * bcs[bc]["u_t_w"] * df.ds(bc)
+ (
......
......@@ -65,7 +65,7 @@ mode: heat
kn: 0.1
xi_tilde: 1.0
heat_source: 2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)
mass_source: 2.0/5.0 * (1.0 - (5.0*std::pow(sqrt(pow(x[0],2)+pow(x[1],2)),2))/(18.0*pow(kn,2))) * std::cos(phi)
mass_source: 0
body_force: [0,0]
# Boundary Conditions
......
......@@ -65,7 +65,7 @@ mode: heat
kn: 0.1
xi_tilde: 1.0
heat_source: 2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)
mass_source: 2.0/5.0 * (1.0 - (5.0*std::pow(sqrt(pow(x[0],2)+pow(x[1],2)),2))/(18.0*pow(kn,2))) * std::cos(phi)
mass_source: 0
body_force: [0,0]
# Boundary Conditions
......
......@@ -65,7 +65,7 @@ mode: heat
kn: 0.1
xi_tilde: 1.0
heat_source: 2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)
mass_source: 2.0/5.0 * (1.0 - (5.0*std::pow(sqrt(pow(x[0],2)+pow(x[1],2)),2))/(18.0*pow(kn,2))) * std::cos(phi)
mass_source: 0
body_force: [0,0]
# Boundary Conditions
......
......@@ -66,7 +66,7 @@ mode: heat
kn: 10.0
xi_tilde: 1.0
heat_source: 2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)
mass_source: 2.0/5.0 * (1.0 - (5.0*std::pow(sqrt(pow(x[0],2)+pow(x[1],2)),2))/(18.0*pow(kn,2))) * std::cos(phi)
mass_source: 0
body_force: [0,0]
# Boundary Conditions
......
......@@ -64,7 +64,7 @@ nsd: 2
mode: r13
kn: 1.0
xi_tilde: 1.0
heat_source: 0
heat_source: 1.0 * (1.0 - (5.0*pow(R,2))/(18.0*pow(kn,2))) * cos(phi)
mass_source: 1.0 * (1.0 - (5.0*pow(R,2))/(18.0*pow(kn,2))) * cos(phi)
body_force: [0,0]
......
......@@ -62,7 +62,7 @@ nsd: 2
mode: r13
kn: 1.0
xi_tilde: 1.0
heat_source: 0
heat_source: 1.0 * (1.0 - (5.0*pow(R,2))/(18.0*pow(kn,2))) * cos(phi)
mass_source: 1.0 * (1.0 - (5.0*pow(R,2))/(18.0*pow(kn,2))) * cos(phi)
body_force: [0,0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment