Non-cyclic lateral boundary conditions
Figure 1 shows the grid structure for non-cyclic boundary conditions at the left/right boundary LB/RB (bc_lr) and figure 2 for non-cyclic boundary conditions at the north/south boundary NB/SB (bc_ns).
The indices (i,j,k) represent the directions (x,y,z).
The model domain extends from -1:nx+1 in the x-direction, from -1:ny+1 in the y-direction and from 0:nzt+1 in the z-direction.
For the advection scheme of Wicker and Skamarock, two more grid points are added at the lateral boundaries which are not needed for non-cyclic boundary conditions.
The figures display the grid layer of the horizontal velocity components u and v, and scalar s.
The grid points of the vertical velocity w are defined at the scalar position but shifted by one half grid spacing in vertical direction (not shown, detailed information about the grid structure in PALM can be found here).
The prognostic equations are solved at all inner grid points which are marked black.
The grid points at the respective non-cyclic boundaries (blue) are treated as follows.
Figure 1: Grid structure at the lateral boundaries with non-cyclic lateral boundary conditions along the left-right direction.
Figure 2: Grid structure of the lateral boundaries with non-cyclic lateral boundary conditions along the north-south direction.
LB is defined at i = -1 for v, w, s and at i = 0 for u.
SB is defined at j = -1 for u, w, s and at j = 0 for v.
RB is defined at i = nx + 1 and NB at j = ny + 1 for all quantities.
LB and SB are treated this way so that the order and number of grid points for the streamwise velocity component and scalars is the same, independent of the flow direction.
For technical reasons, the prognostic equations are first solved for u at i = 0 (v at j = 0), since these grid points technically belong to the inner grid, but afterwards, these results at i = 0 (j = 0) are replaced by the respective boundary condition in routine boundary_conds.f90.
In case of a Dirichlet condition, the values at i = 0 (j = 0) are taken from i = -1 (j = -1).
In case of a radiation boundary condition, the solution of the Sommerfeld equation overwrites the prognostic values at i = 0 (j = 0).
For non-cyclic lateral boundary conditions, the parameter psolver has to be set to 'multigrid' because the default FFT-solver can only be applied for cyclic boundary conditions.
Inflow boundary
At the inflow boundary, Dirichlet conditions are used for the three velocity components ψ = {u,v,w} as well as for all scalar quantities s and are implemented as follows (here e.g. for s and a flow in positive x direction):
TracMath macro processor has detected an error. Please fix the problem before continuing.
The command:
'/usr/bin/pdflatex -interaction=nonstopmode aea1766d507d4aa5852bc125d8eb9a395d4957c4.tex'
failed with the following output:
"This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)\n restricted \\write18 enabled.\nentering extended mode\n(./aea1766d507d4aa5852bc125d8eb9a395d4957c4.tex\nLaTeX2e <2011/06/27>\nBabel <3.9h> and hyphenation patterns for 78 languages loaded.\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/article.cls\nDocument Class: article 2007/10/19 v1.4h Standard LaTeX document class\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/size10.clo))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/inputenc.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/utf8.def\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1enc.dfu)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/ot1enc.dfu)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/omsenc.dfu)))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/cmap/cmap.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/cm-super/type1ec.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1cmr.fd))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/fontenc.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1enc.def)<<t1.cmap\n>>) (/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsmath.sty\nFor additional information on amsmath, use the `?' option.\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amstext.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsgen.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsbsy.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsopn.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amscls/amsthm.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/amssymb.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/amsfonts.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/tools/bm.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/preview/preview.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/preview/prtightpage.def)\n)\nNo file aea1766d507d4aa5852bc125d8eb9a395d4957c4.aux.\nPreview: Fontsize 10pt\nPreview: PDFoutput 1\n! Missing $ inserted.\n<inserted text> \n $\nl.14 s^\n {t + \\Delta t}(k,j,-1) = s_{init}(k) \\; . \\quad(1)\n<<ot1.cmap>><<oml.cmap>><<oms.cmap>><<omx.cmap>>\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/umsa.fd)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/umsb.fd)\n! Missing $ inserted.\n<inserted text> \n $\nl.15 \\end{preview}\n \nPreview: Tightpage -32891 -32891 32891 32891\n[1{/localdata/software/texlive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.ma\np}] (./aea1766d507d4aa5852bc125d8eb9a395d4957c4.aux) )\n(see the transcript file for additional information){/localdata/software/texliv\ne/2013/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc}</localdata/software\n/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></localdata/\nsoftware/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb></loc\naldata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pf\nb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/c\nmr7.pfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfont\ns/cm/cmsy10.pfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public\n/cm-super/sfrm1000.pfb>\nOutput written on aea1766d507d4aa5852bc125d8eb9a395d4957c4.pdf (1 page, 52571 b\nytes).\nTranscript written on aea1766d507d4aa5852bc125d8eb9a395d4957c4.log.\n"
t denotes the time, Δt the time step and sinit the initialization profile of the scalar quantities which is constant in time.
The quantities at the inflow are set by the initial vertical profiles (see initializing_actions).
A Neumann condition is used for the subgrid-scale turbulent kinetic energy e (here e.g. for a left-right flow):
TracMath macro processor has detected an error. Please fix the problem before continuing.
The command:
'/usr/bin/pdflatex -interaction=nonstopmode 0df2bbf778e7d0e92b24fbe4a3fa447172f02f3f.tex'
failed with the following output:
"This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)\n restricted \\write18 enabled.\nentering extended mode\n(./0df2bbf778e7d0e92b24fbe4a3fa447172f02f3f.tex\nLaTeX2e <2011/06/27>\nBabel <3.9h> and hyphenation patterns for 78 languages loaded.\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/article.cls\nDocument Class: article 2007/10/19 v1.4h Standard LaTeX document class\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/size10.clo))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/inputenc.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/utf8.def\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1enc.dfu)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/ot1enc.dfu)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/omsenc.dfu)))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/cmap/cmap.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/cm-super/type1ec.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1cmr.fd))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/fontenc.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1enc.def)<<t1.cmap\n>>) (/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsmath.sty\nFor additional information on amsmath, use the `?' option.\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amstext.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsgen.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsbsy.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsopn.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amscls/amsthm.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/amssymb.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/amsfonts.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/tools/bm.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/preview/preview.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/preview/prtightpage.def)\n)\nNo file 0df2bbf778e7d0e92b24fbe4a3fa447172f02f3f.aux.\nPreview: Fontsize 10pt\nPreview: PDFoutput 1\n! Missing $ inserted.\n<inserted text> \n $\nl.14 e^\n {t + \\Delta t}(k,j,-1) = e^{t + \\Delta t}(k,j,0) \\; . \\quad(2)\n<<ot1.cmap>><<oml.cmap>><<oms.cmap>><<omx.cmap>>\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/umsa.fd)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/umsb.fd)\n! Missing $ inserted.\n<inserted text> \n $\nl.15 \\end{preview}\n \nPreview: Tightpage -32891 -32891 32891 32891\n[1{/localdata/software/texlive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.ma\np}] (./0df2bbf778e7d0e92b24fbe4a3fa447172f02f3f.aux) )\n(see the transcript file for additional information){/localdata/software/texliv\ne/2013/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc}</localdata/software\n/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></localdata/\nsoftware/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb></loc\naldata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pf\nb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/c\nmr7.pfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfont\ns/cm/cmsy10.pfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public\n/cm-super/sfrm1000.pfb>\nOutput written on 0df2bbf778e7d0e92b24fbe4a3fa447172f02f3f.pdf (1 page, 45537 b\nytes).\nTranscript written on 0df2bbf778e7d0e92b24fbe4a3fa447172f02f3f.log.\n"
To prevent gravity waves from being reflected at the inflow, a relaxation term can be added to the prognostic equations for the potential temperature θ (Davies, 1976):
TracMath macro processor has detected an error. Please fix the problem before continuing.
The command:
'/usr/bin/pdflatex -interaction=nonstopmode 1c575cb34a5033432c39aad25d1c7873f5802aa7.tex'
failed with the following output:
"This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)\n restricted \\write18 enabled.\nentering extended mode\n(./1c575cb34a5033432c39aad25d1c7873f5802aa7.tex\nLaTeX2e <2011/06/27>\nBabel <3.9h> and hyphenation patterns for 78 languages loaded.\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/article.cls\nDocument Class: article 2007/10/19 v1.4h Standard LaTeX document class\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/size10.clo))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/inputenc.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/utf8.def\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1enc.dfu)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/ot1enc.dfu)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/omsenc.dfu)))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/cmap/cmap.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/cm-super/type1ec.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1cmr.fd))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/fontenc.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1enc.def)<<t1.cmap\n>>) (/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsmath.sty\nFor additional information on amsmath, use the `?' option.\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amstext.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsgen.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsbsy.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsopn.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amscls/amsthm.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/amssymb.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/amsfonts.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/tools/bm.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/preview/preview.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/preview/prtightpage.def)\n)\nNo file 1c575cb34a5033432c39aad25d1c7873f5802aa7.aux.\nPreview: Fontsize 10pt\nPreview: PDFoutput 1\n! Missing $ inserted.\n<inserted text> \n $\nl.14 \\theta\n ^{t+1}(d) = ... - \\Delta t \\cdot K(d) \\cdot \\left( \\theta^{t}(d) ...\n\n<<ot1.cmap>><<oml.cmap>><<oms.cmap>><<omx.cmap>>\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/umsa.fd)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/umsb.fd)\n! Missing $ inserted.\n<inserted text> \n $\nl.15 \\end{preview}\n \nPreview: Tightpage -32891 -32891 32891 32891\n[1{/localdata/software/texlive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.ma\np}] (./1c575cb34a5033432c39aad25d1c7873f5802aa7.aux) )\n(see the transcript file for additional information)</localdata/software/texliv\ne/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></localdata/softwar\ne/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb></localdata/\nsoftware/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></loc\naldata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb\n></localdata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cm\nsy10.pfb>\nOutput written on 1c575cb34a5033432c39aad25d1c7873f5802aa7.pdf (1 page, 44716 b\nytes).\nTranscript written on 1c575cb34a5033432c39aad25d1c7873f5802aa7.log.\n"
Here, d is the distance normal to the wall and θinit the initial value of the potential temperature, which corresponds to the value at the inflow boundary.
The damping or relaxation function K depends only on the distance d to the inflow.
K is calculated by
TracMath macro processor has detected an error. Please fix the problem before continuing.
The command:
'/usr/bin/pdflatex -interaction=nonstopmode 8893e893b7d5f0e21bd11d7b25520deaa92f64dd.tex'
failed with the following output:
"This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)\n restricted \\write18 enabled.\nentering extended mode\n(./8893e893b7d5f0e21bd11d7b25520deaa92f64dd.tex\nLaTeX2e <2011/06/27>\nBabel <3.9h> and hyphenation patterns for 78 languages loaded.\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/article.cls\nDocument Class: article 2007/10/19 v1.4h Standard LaTeX document class\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/size10.clo))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/inputenc.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/utf8.def\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1enc.dfu)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/ot1enc.dfu)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/omsenc.dfu)))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/cmap/cmap.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/cm-super/type1ec.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1cmr.fd))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/fontenc.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/base/t1enc.def)<<t1.cmap\n>>) (/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsmath.sty\nFor additional information on amsmath, use the `?' option.\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amstext.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsgen.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsbsy.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsmath/amsopn.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amscls/amsthm.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/amssymb.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/amsfonts.sty))\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/tools/bm.sty)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/preview/preview.sty\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/preview/prtightpage.def)\n)\nNo file 8893e893b7d5f0e21bd11d7b25520deaa92f64dd.aux.\nPreview: Fontsize 10pt\nPreview: PDFoutput 1\n! Missing $ inserted.\n<inserted text> \n $\nl.15 \\begin{cases}\n \n<<ot1.cmap>><<oml.cmap>><<oms.cmap>><<omx.cmap>>\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/umsa.fd)\n(/localdata/software/texlive/2013/texmf-dist/tex/latex/amsfonts/umsb.fd)\n! Missing $ inserted.\n<inserted text> \n $\nl.17 \\end{cases}\n . \\quad (4)\nPreview: Tightpage -32891 -32891 32891 32891\n[1{/localdata/software/texlive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.ma\np}] (./8893e893b7d5f0e21bd11d7b25520deaa92f64dd.aux) )\n(see the transcript file for additional information){/localdata/software/texliv\ne/2013/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc}</localdata/software\n/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></localdata/\nsoftware/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></lo\ncaldata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi5.p\nfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/\ncmmi7.pfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/public/amsfo\nnts/cm/cmr10.pfb></localdata/software/texlive/2013/texmf-dist/fonts/type1/publi\nc/amsfonts/cm/cmr7.pfb></localdata/software/texlive/2013/texmf-dist/fonts/type1\n/public/amsfonts/cm/cmsy10.pfb></localdata/software/texlive/2013/texmf-dist/fon\nts/type1/public/amsfonts/cm/cmsy7.pfb></localdata/software/texlive/2013/texmf-d\nist/fonts/type1/public/cm-super/sfrm1000.pfb>\nOutput written on 8893e893b7d5f0e21bd11d7b25520deaa92f64dd.pdf (1 page, 78264 b\nytes).\nTranscript written on 8893e893b7d5f0e21bd11d7b25520deaa92f64dd.log.\n"
df is a damping factor to control the damping intensity, and dw is the width of the relaxation region extending from the inflow. Quantities df and dw can be set with parameters pt_damping_factor and pt_damping_width, respectively.
Both parameters have to be set by the user and must be adjusted case-by-case, because both parameters depend on the numerical and physical conditions, so that application of universal default values is not possible.
So far, we have experience with gravity waves in case of cold air outbreaks, which grow in amplitude up to quite extreme values, if no damping is applied.
In the respective simulations, we used typical values for pt_damping_factor of 0.05 and for pt_damping_width of 25 km in order to prevent the gravity waves from growing.