commit 0ba13271550ac4ddcf81e374e6369b1a9c6df541
parent 620f6f19695e77e33f8378b6d43d60fa507f60dc
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 20 Jul 2021 15:00:06 +0200
Add the htrdr combustion starter pack
Diffstat:
8 files changed, 86 insertions(+), 14 deletions(-)
diff --git a/htrdr/Makefile b/htrdr/Makefile
@@ -15,6 +15,7 @@
HTRDR-VERSION=0.7.0
HTRDR-ATMOSPHERE-STARTER-PACK-VERSION=0.6.1
+HTRDR-COMBUSTION-STARTER-PACK-VERSION=0.0.0
SRC = htrdr.html.in htrdr-docs.html.in htrdr.sh
HTML = \
@@ -28,17 +29,26 @@ IMG = \
CLEMENT_lw_9000_10000.jpg \
downward_flux_500x500x2048_lw_4000_100000_425.156.jpg \
downward_flux_500x500x2048_sw_380_4000_879.349.jpg \
+ dummy_medium.jpg \
+ dummy_medium_clipped.jpg \
DZVAR2.jpg \
DZVAR.jpg \
HRES_ARMCu.jpg \
L12km_BOMEX.jpg \
- L25_Fire.jpg
+ L25_Fire.jpg \
+ valid_800x600x4096.gif \
+ valid_800x600x4096_thumb.gif \
+ valid_pview.gif \
+ valid_pview_thumb.gif
.PHONY: all clean default publish
default: all
all: ${SRC}
- @bash htrdr.sh ${HTRDR-VERSION} ${HTRDR-ATMOSPHERE-STARTER-PACK-VERSION}
+ @bash htrdr.sh \
+ ${HTRDR-VERSION} \
+ ${HTRDR-ATMOSPHERE-STARTER-PACK-VERSION} \
+ ${HTRDR-COMBUSTION-STARTER-PACK-VERSION}
publish:
rsync -avzr ${HTML} ${IMG} downloads man ${REMOTE}/htrdr/
diff --git a/htrdr/downloads/htrdr-Combustion-Starter-Pack-0.0.0.tar.gz b/htrdr/downloads/htrdr-Combustion-Starter-Pack-0.0.0.tar.gz
@@ -0,0 +1 @@
+#$# git-wad 625d8bd30ea7c482a293c2b091eb7868a8f7258c3314219866f6c79008aa1941 103817543
+\ No newline at end of file
diff --git a/htrdr/dummy_medium.jpg b/htrdr/dummy_medium.jpg
@@ -0,0 +1 @@
+#$# git-wad 51c35320c6b962d04decb9233abfeab3c074b521634a6f726282166d236cd2dc 177153
+\ No newline at end of file
diff --git a/htrdr/dummy_medium_clip.png b/htrdr/dummy_medium_clip.png
@@ -0,0 +1 @@
+#$# git-wad 9be6773f7c00a9d624adced11b7594000f662f6e3ded9b9f106786f93fc2fd88 171106
+\ No newline at end of file
diff --git a/htrdr/dummy_medium_clipped.jpg b/htrdr/dummy_medium_clipped.jpg
@@ -0,0 +1 @@
+#$# git-wad 29feb576a335f295ad1a0422d76734cd25b4e41077dad968a0c17c063f77fb8e 160914
+\ No newline at end of file
diff --git a/htrdr/htrdr-combustion-spk.html.in b/htrdr/htrdr-combustion-spk.html.in
@@ -1,7 +0,0 @@
-<header>
- <h1>
- Combustion Starter Pack
- </h1>
-</header>
-
-<p>Under construction</p>
diff --git a/htrdr/htrdr.html.in b/htrdr/htrdr.html.in
@@ -341,7 +341,7 @@ Use the <code>man</code> command-line to consult them. For example:</p>
~ $ man htrdr-combustion
</pre>
-<p>Refer to the <a href=htrdr-atmosphere-spk.html>Starter Packs</a> to quickly run a
+<p>Refer to the Starter Packs to quickly run a
<code>htrdr</code> rendering; these archives provide input data and scripts
that are good starting points to use <code>htrdr</code>.
diff --git a/htrdr/htrdr.sh b/htrdr/htrdr.sh
@@ -19,8 +19,8 @@ set -e
source ../meso-menu.sh
-if [ $# -lt 2 ]; then
- echo "Usage: $0 VERSION VERSION_ATMSPK"
+if [ $# -lt 3 ]; then
+ echo "Usage: $0 VERSION VERSION-ATMOSPHERE-SPK VERSION-COMBUSTION-SPK"
exit 1
fi
@@ -63,6 +63,8 @@ cp "$dir_curr/downloads/$arch.tar.gz" .
tar xzf $arch.tar.gz
htrdr_atmspk=htrdr-Atmosphere-Starter-Pack-$2
tar xzf $dir_curr/downloads/$htrdr_atmspk.tar.gz $htrdr_atmspk/README.md
+htrdr_comspk=htrdr-Combustion-Starter-Pack-$3
+tar xzf $dir_curr/downloads/$htrdr_comspk.tar.gz $htrdr_comspk/README.md.in
cd $dir_curr
################################################################################
@@ -236,14 +238,73 @@ archs+=" $(find downloads -regex ".*/High-Tune-Starter-Pack.*\.tar.gz" | sort -r
} > htrdr-atmosphere-spk.html
################################################################################
-# Generate the reference documentation
+# Generate the combustion starter pack
################################################################################
echo "Write htrdr-combustion-spk.html"
+VERSION=$3 envsubst < $dir_temp/$htrdr_comspk/README.md.in \
+ | $markdown \
+ | sed 's/<pre><code>/<pre class=code>/g' \
+ | sed 's/<\/code><\/pre>/<\/pre>/g' \
+ > $dir_temp/$htrdr_comspk/README.html
+
+intro=$(cat $dir_temp/$htrdr_comspk/README.html \
+ | sed 1d \
+ | sed '0,/<code>htrdr<\/code>/s//<a href=man\/man1\/htrdr.1.html>htrdr<\/a>/' \
+ | sed '0,/<code>htrdr-combustion<\/code>/s//<a href=man\/man1\/htrdr-combustion.1.html>htrdr-combustion<\/a>/' \
+ | sed '/^<h2>Content<\/h2>/,$d')
+
+content=$(cat $dir_temp/$htrdr_comspk/README.html \
+ | sed '/^<h2>Content<\/h2>/,$!d' \
+ | sed 1d \
+ | sed '0,/<code>htrdr<\/code>/s//<a href=man\/man1\/htrdr.1.html>htrdr<\/a>/' \
+ | sed '0,/<code>htrdr-combustion<\/code>/s//<a href=man\/man1\/htrdr-combustion.1.html>htrdr-combustion<\/a>/' \
+ | sed '/^<h2>Copyright notice<\/h2>/,$d')
+
+copying=$(cat $dir_temp/$htrdr_comspk/README.html \
+ | sed '/^<h2>Copyright notice<\/h2>/,$!d')
+
{
print_header htrdr Combustion-Starter-Pack
- cat htrdr-combustion-spk.html.in
+
+ echo "<header>"
+ echo " <h1>Combustion Starter Pack</h1>"
+ echo "</header>"
+ echo "<div class="news">"
+ echo " <p><b>Combustion Starter Pack $3</b></p>"
+ echo " <ul>"
+ echo " <li><a href=\"downloads/htrdr-Combustion-Starter-Pack-$3.tar.gz\">tarball</a> /"
+ echo " <a href=\"downloads/htrdr-Combustion-Starter-Pack-$3.tar.gz.sig\">pgp</a></li>"
+ echo " </ul>"
+ echo "</div>"
+
+ echo "$intro"
+
+ echo '<h2>Content</h2>'
+ echo '<div class="img" style="width: 20em">'
+ echo ' <div style="width: 49.5%; float: left; padding-right: 1%" >'
+ echo ' <a href="dummy_medium.jpg">'
+ echo ' <img src="dummy_medium.jpg" alt="dummy_medium">'
+ echo ' </a>'
+ echo ' </div>'
+ echo ' <div style="width: 49.5%; float: left; padding-right: 0%">'
+ echo ' <a href="dummy_medium_clipped.jpg">'
+ echo ' <img src="dummy_medium_clipped.jpg" alt="dummy_medium_clipped">'
+ echo ' </a>'
+ echo ' </div>'
+ echo ''
+ echo ' <div class=caption>Illustration of the combustion medium provided in the'
+ echo ' Starter Pack. This medium is illuminated by a laser sheet whose surface of'
+ echo ' emission is here represented in red. The image on the right shows the'
+ echo ' entire medium. In the image on the left, the medium is clipped along the y axis'
+ echo ' to emphasize the axisymmetric profile of its soot volume fraction.</div>'
+ echo '</div>'
+
+ echo "$content"
+ echo "$copying"
+
print_footer
+
} > htrdr-combustion-spk.html
################################################################################