Skip to content

Commit d1c863e

Browse files
committed
pbl: comments about differences between explicit and implicit boussinesq
1 parent d8833d9 commit d1c863e

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

libmpdata++/solvers/detail/boussinesq_expl.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* @section LICENSE
55
* GPLv3+ (see the COPYING file or http://www.gnu.org/licenses/)
66
*/
7+
8+
// explicit - ix::tht is theta
9+
710
#pragma once
811
#include <libmpdata++/solvers/detail/boussinesq_sgs_common.hpp>
912

libmpdata++/solvers/detail/boussinesq_impl.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
* @section LICENSE
55
* GPLv3+ (see the COPYING file or http://www.gnu.org/licenses/)
66
*/
7+
8+
// implicit - ix::tht is the perturbation of theta, i.e. (theta - theta_env)
9+
// compared with explicit modeling of theta, this leads to additional forcing
10+
// w * dz(theta_env)
11+
712
#pragma once
813
#include <libmpdata++/solvers/detail/boussinesq_sgs_common.hpp>
914

tests/sandbox/pbl/pbl_test_def.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ void test(const std::string &dirname, const int np, const int nt)
135135
slv.advectee(ix::u) = 0;
136136
slv.advectee(ix::v) = 0;
137137

138+
// for explicit boussinesq (impl_tht == false), ix::tht needs to be full theta (not perturbation)
139+
/*
140+
* blitz::thirdIndex k;
141+
* slv.advectee(ix::tht) += 300 * where(k * p.dk <= mixed_length, 1, 1 + (k * p.dk - mixed_length) * st);
142+
*/
143+
138144
{
139145
blitz::thirdIndex k;
140146
// environmental potential temperature profile

0 commit comments

Comments
 (0)