source: palm/trunk/DOC/app/chapter_3.5.3.html @ 524

Last change on this file since 524 was 132, checked in by letzel, 17 years ago

Vertical profiles now based on nzb_s_inner; they are divided by
ngp_2dh_s_inner (scalars, procucts of scalars and velocity components) and
ngp_2dh (staggered velocity components and their products), respectively.

Allow new case bc_uv_t = 'dirichlet_0' for channel flow.

  • Property svn:keywords set to Id
File size: 10.9 KB
RevLine 
[5]1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
[48]2<html><head>
[132]3<meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM chapter 3.5.3</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;14001660"> <meta name="CHANGED" content="20041112;14483720"> <meta name="KEYWORDS" content="parallel LES model"> <style>
[62]4<!--
5@page { size: 21cm 29.7cm }
6-->
7</style></head>
8<body style="direction: ltr;" lang="en-US"><h3 style="line-height: 100%;">3.5.3 Definition of user-defined
[5]9subdomains</h3>
[62]10<p style="line-height: 100%;">By default, the values of
11the timeseries quantities and the horizontally averaged vertical
12profiles (saved in local files
[5]13<a href="chapter_3.4.html#PLOT1D_DATA">PLOT1D_DATA</a>
14and <a href="chapter_3.4.html#LIST_PROFIL">LIST_PROFIL</a>)
15always refer to the total model domain. Independently, up to 9 time
16series or profiles for different user-defined subdomains can be
17computed and plotted additionally. Steering in principle is done
[48]18via the initialization parameter <a href="chapter_4.1.html#statistic_regions">statistic_regions</a>.
[5]19</p>
[62]20<p style="line-height: 100%;">The exact definition of
21these subdomains
[5]22has to be made by the user within the user-defined subroutine
[62]23<tt><font style="font-size: 10pt;" size="2">init_user</font></tt>.
24The
[48]25subdomains are defined with a mask array named <tt><font style="font-size: 10pt;" size="2">rmask</font></tt>,
[5]26which has to be given the value 1.0 for all horizontal grid points
27belonging to
28the user-defined subdomain and the value 0.0, where grid points do not
29belong
30to the user-defined subdomain. In the model <tt><font size="2">rmask</font></tt>
31is
32declared as: </p>
[62]33<ul> <p style="line-height: 100%;"><tt><font style="font-size: 10pt;" size="2">REAL :: rmask
[132]34(nys-1:nyn+1,nxl-1:nxr+1,0:9) .</font></tt></p>
[62]35</ul><p style="line-height: 100%;">The first two
36indices are the grid point
[48]37indices in y and x-direction. With parallel model runs <tt><font style="font-size: 10pt;" size="2">nxl</font></tt><font style="font-size: 10pt;" size="2">,
38</font><tt><font style="font-size: 10pt;" size="2">nxr</font></tt><font style="font-size: 10pt;" size="2">,
39</font><tt><font style="font-size: 10pt;" size="2">nys</font></tt><font style="font-size: 10pt;" size="2">
40<font size="3">and</font> </font><tt><font style="font-size: 10pt;" size="2">nyn</font></tt>
[5]41are the array bounds of the respective subdomain (don't confuse this
42with the user-defined subdomain!) on the
[48]43respective processor. With runs on one processor <tt><font style="font-size: 10pt;" size="2">nys</font></tt><font style="font-size: 10pt;" size="2">
44= </font><tt><font style="font-size: 10pt;" size="2">nxl</font></tt><font style="font-size: 10pt;" size="2">
45= 0</font> and <font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">nxr
[5]46=</font> </font><a href="chapter_4.1.html#nx">nx</a>
[48]47and <font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">nyn
[5]48=</font></font> <a href="chapter_4.1.html#ny">ny</a>.
49The third index determines the user-defined subdomain. The total model
50domain
51carries the index 0, the user-defined subdomains have the values 1 to
529. </p>
[62]53<p style="line-height: 100%;">The following example should
54illustrate
[5]55this. Two subdomains are defined by the user. The first is determined
56by all grid
57points which lie within a circle whose center is equal to the
58(horizontal) center of the model domain and whose diameter is equal
59to half of the total horizontal domain size (square total domain
60assumed).
61The second subdomain should be defined by all points outside of this
[48]62domain. This may be obtained by the following lines of code in <tt><font style="font-size: 10pt;" size="2">user_init</font></tt>:
[5]63</p>
[62]64<ul> <p style="line-height: 100%;"><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">USE
65grid_variables</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">USE indices</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">USE statistics</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">.</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">.</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">.</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">disc_center_x = dx * (nx + 1)/2</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">disc_center_y = dy * (ny + 1)/2</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">disc_radius = 0.5 *
66disc_center_x</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">DO&nbsp; i = nxl-1, nxr+1</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp; x = i * dx</font></font></tt><br>
67<tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;
68DO&nbsp; j = nys-1, nyn+1</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
69y = j * dy</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
70radial_distance = SQRT( ( x - disc_center_x )**2 + &amp;</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
71( y - disc_center_y )**2 )</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp; &nbsp;
72&nbsp; IF ( radial_distance
73&gt; disc_radius )&nbsp; THEN</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
74rmask(j,i,1) = 0.0</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
75rmask(j,i,2) = 1.0</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
76ELSE</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
77rmask(j,i,1) = 1.0</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
78rmask(j,i,2) = 0.0</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
79ENDIF</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp; ENDDO</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">ENDDO</font></font></tt></p>
80</ul><p style="line-height: 100%;">The module <span style="font-family: monospace;">statistics</span> must
81be used,
[5]82because it contains <span style="font-family: monospace;">rmask</span>
83and the modules <span style="font-family: monospace;">grid_variables</span>
[62]84and <span style="font-family: monospace;">indices</span>
85are
[5]86necessary in this example, because grid spacing and indices are used.
87All array elements of <span style="font-family: monospace;">rmask</span>
[62]88(<span style="font-family: monospace;">rmask(:,:,:)</span>)
89are preset
[5]90by the model with 1.0. In no case this assignment must be
91changed for the total domain (<span style="font-family: monospace;">rmask(:,:,0)</span>)!
92Computations and output for the user-defined subdomains only take place
93if
94the user sets <a href="chapter_4.1.html#statistic_regions">statistic_regions</a>
[62]95&ge; <i>1</i>. Beyond that, names for the user-defined
96subdomains can be
[5]97assigned
98via the initialization parameter <a href="chapter_4.3.html#region">region</a>.
99Output of the names of the selected user-defined subdomains happens in
100the local files <a href="chapter_3.4.html#HEADER">HEADER</a>
101and <a href="chapter_3.4.html#RUN_CONTROL">RUN_CONTROL</a>
[48]102within the user-defined subroutine <tt><font style="font-size: 10pt;" size="2">user_header</font></tt>.
[5]103<br>
104&nbsp; </p>
[62]105<hr><p style="line-height: 100%;"><br>
106<font color="#000080"><font color="#000080"><a href="chapter_3.5.2.html"><font color="#000080"><img src="left.gif" name="Grafik1" align="bottom" border="2" height="32" width="32"></font></a><a href="index.html"><font color="#000080"><img src="up.gif" name="Grafik2" align="bottom" border="2" height="32" width="32"></font></a><a href="chapter_3.5.4.html"><font color="#000080"><img src="right.gif" name="Grafik3" align="bottom" border="2" height="32" width="32"></font></a></font></font></p><p style="line-height: 100%;"><i>Last change:&nbsp;</i>
107$Id: chapter_3.5.3.html 132 2007-11-20 09:46:11Z raasch $</p>
[48]108</body></html>
Note: See TracBrowser for help on using the repository browser.