Skip to content

Commit

Permalink
realbook2html
Browse files Browse the repository at this point in the history
  • Loading branch information
gtheler committed May 2, 2019
1 parent e64bd93 commit d80ca8a
Show file tree
Hide file tree
Showing 113 changed files with 122,740 additions and 505 deletions.
4 changes: 2 additions & 2 deletions doc/realbook/000-hello/README.m4
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
define(case_title, Hello world)
...
---
title: case_title
inputs: hello
tags: PRINT TEXT
---
...

# case_title

Expand Down
4 changes: 2 additions & 2 deletions doc/realbook/000-hello/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

...
---
title: Hello world
inputs: hello
tags: PRINT TEXT
---
...

# Hello world

Expand Down
4 changes: 2 additions & 2 deletions doc/realbook/001-peano/README.m4
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
define(case_title, The Peano axiom)
...
---
title: case_title
inputs: peano
tags: PRINT expressions
---
...

# case_title

Expand Down
4 changes: 2 additions & 2 deletions doc/realbook/001-peano/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

...
---
title: The Peano axiom
inputs: peano
tags: PRINT expressions
---
...

# The Peano axiom

Expand Down
4 changes: 2 additions & 2 deletions doc/realbook/002-expressions/README.m4
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
define(case_title, Algebraic expressions)
...
---
title: case_title
inputs: expr hoc
tags: PRINT = expressions TEXT
---
...

# case_title

Expand Down
4 changes: 2 additions & 2 deletions doc/realbook/002-expressions/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

...
---
title: Algebraic expressions
inputs: expr hoc
tags: PRINT = expressions TEXT
---
...

# Algebraic expressions

Expand Down
4 changes: 2 additions & 2 deletions doc/realbook/003-lag/README.m4
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
define(case_title, First-order lags)
...
---
title: case_title
inputs: lag compact quasi-sine
tags: end_time dt lag HEADER
---
...

# case_title

Expand Down
4 changes: 2 additions & 2 deletions doc/realbook/003-lag/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

...
---
title: First-order lags
inputs: lag compact quasi-sine
tags: end_time dt lag HEADER
---
...

# First-order lags

Expand Down
84 changes: 49 additions & 35 deletions doc/realbook/003-lag/lag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 38 additions & 46 deletions doc/realbook/003-lag/quasi-sine.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions doc/realbook/004-exp/README.m4
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
define(case_title, A simple differential equation)
...
---
title: case_title
inputs: exp exp-dt
tags: PHASE_SPACE PRINT HEADER = .= end_time min_dt max_dt rel_error
---
...

# case_title

Expand Down
10 changes: 4 additions & 6 deletions doc/realbook/004-exp/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

...
---
title: A simple differential equation
inputs: exp exp-dt
tags: PHASE_SPACE PRINT HEADER = .= end_time min_dt max_dt rel_error
---
...

# A simple differential equation

Expand Down Expand Up @@ -61,10 +61,8 @@ $ wasora exp-dt.was 0.1 0 > exp-dt2.dat
$ wasora exp-dt.was 0 0.1 > exp-dt3.dat
$ wasora exp-dt.was 0.1 0.1 > exp-dt4.dat
$ wasora exp-dt.was 1 1 > exp-dt5.dat
$ pyxplot exp-dt.ppl; pdf2psvg exp-dt.pdf exp-dt.svg; rm -f exp-dt.pdf
./tmp: line 1: pdf2psvg: command not found
$ pyxplot exp-error.ppl; pdf2psvg exp-error.pdf exp-error.svg; rm -f exp-error.pdf
./tmp: line 1: pdf2psvg: command not found
$ pyxplot exp-dt.ppl; pdf2svg exp-dt.pdf exp-dt.svg; rm -f exp-dt.pdf
$ pyxplot exp-error.ppl; pdf2svg exp-error.pdf exp-error.svg; rm -f exp-error.pdf
$
```

Expand Down
4 changes: 2 additions & 2 deletions doc/realbook/004-exp/exp-dt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ wasora exp-dt.was 0.1 0 > exp-dt2.dat
wasora exp-dt.was 0 0.1 > exp-dt3.dat
wasora exp-dt.was 0.1 0.1 > exp-dt4.dat
wasora exp-dt.was 1 1 > exp-dt5.dat
pyxplot exp-dt.ppl; pdf2psvg exp-dt.pdf exp-dt.svg; rm -f exp-dt.pdf
pyxplot exp-error.ppl; pdf2psvg exp-error.pdf exp-error.svg; rm -f exp-error.pdf
pyxplot exp-dt.ppl; pdf2svg exp-dt.pdf exp-dt.svg; rm -f exp-dt.pdf
pyxplot exp-error.ppl; pdf2svg exp-error.pdf exp-error.svg; rm -f exp-error.pdf
500 changes: 500 additions & 0 deletions doc/realbook/004-exp/exp-dt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions doc/realbook/004-exp/exp-dt.term
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ $ wasora exp-dt.was 0.1 0 > exp-dt2.dat
$ wasora exp-dt.was 0 0.1 > exp-dt3.dat
$ wasora exp-dt.was 0.1 0.1 > exp-dt4.dat
$ wasora exp-dt.was 1 1 > exp-dt5.dat
$ pyxplot exp-dt.ppl; pdf2psvg exp-dt.pdf exp-dt.svg; rm -f exp-dt.pdf
./tmp: line 1: pdf2psvg: command not found
$ pyxplot exp-error.ppl; pdf2psvg exp-error.pdf exp-error.svg; rm -f exp-error.pdf
./tmp: line 1: pdf2psvg: command not found
$ pyxplot exp-dt.ppl; pdf2svg exp-dt.pdf exp-dt.svg; rm -f exp-dt.pdf
$ pyxplot exp-error.ppl; pdf2svg exp-error.pdf exp-error.svg; rm -f exp-error.pdf
$
530 changes: 530 additions & 0 deletions doc/realbook/004-exp/exp-error.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions doc/realbook/005-lorenz/README.m4
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
define(case_title, The Lorenz chaotic system)
...
---
title: case_title
inputs: lorenz
tags: PHASE_SPACE CONST PRINT HEADER .= =
---
...

# case_title

Expand Down Expand Up @@ -35,8 +35,8 @@ The ability to solve the Lorenz system---that has both intrigued and inspired me

dnl See also the [besssugo plugin quickstart examples](http://www.talador.com.ar/jeremy/wasora/besssugo/#thelorenzsystem) for videos of applications of wasora to solve and study the Lorenz equations---and other chaotic dynamical systems.

![Lorenz as a function of time][lorenz2d.svg]
![Lorenz as a function of time](lorenz2d.svg)

![The Lorenz attractor in phase space][lorenz3d.svg]
![The Lorenz attractor in phase space](lorenz3d.svg)

case_nav
8 changes: 4 additions & 4 deletions doc/realbook/005-lorenz/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

...
---
title: The Lorenz chaotic system
inputs: lorenz
tags: PHASE_SPACE CONST PRINT HEADER .= =
---
...

# The Lorenz chaotic system

Expand Down Expand Up @@ -60,9 +60,9 @@ $
The ability to solve the Lorenz system---that has both intrigued and inspired me since I was old enough to understand differential equations---with such simple and concise instructions shows me that indeed wasora has something to provide to the scientific/engineering community.


![Lorenz as a function of time][lorenz2d.svg]
![Lorenz as a function of time](lorenz2d.svg)

![The Lorenz attractor in phase space][lorenz3d.svg]
![The Lorenz attractor in phase space](lorenz3d.svg)

-------
:::{.text-center}
Expand Down
4 changes: 2 additions & 2 deletions doc/realbook/006-fibonacci/README.m4
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
define(case_title, The Fibonacci sequence)
...
---
title: case_title
inputs: fibo_vector fibo_iterative fibo_formula
tags: VECTOR SIZE PRINT_VECTOR FORMAT IF ELSE ENDIF := static_steps vecsize sqrt
---
...

# case_title

Expand Down
4 changes: 2 additions & 2 deletions doc/realbook/006-fibonacci/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

...
---
title: The Fibonacci sequence
inputs: fibo_vector fibo_iterative fibo_formula
tags: VECTOR SIZE PRINT_VECTOR FORMAT IF ELSE ENDIF := static_steps vecsize sqrt
---
...

# The Fibonacci sequence

Expand Down
12 changes: 6 additions & 6 deletions doc/realbook/007-functions/README.m4
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
define(case_title, One-dimensional functions)
...
---
title: case_title
inputs: algebraic inline file vectors satwater
tags: FUNCTION PRINT_FUNCTION MIN MAX STEP VAR FILE FILE_PATH VECTORS NUMBER OUTPUT_FILE INTERPOLATION cspline akima linear sin cos log sqrt derivative integral
---
...

# case_title

Expand Down Expand Up @@ -72,13 +72,11 @@ include(vectors.was)dnl
include(vectors.term)dnl
```

![Derivatives](derivatives-dat)
![Derivatives](derivatives-dat.svg)

![Integrals](integrals-dat)
![Integrals](integrals-dat.svg)


case_nav

## satwater.was

This example builds functions of saturated water properties by reading a file, which can be freely downloaded from [NIST](http://webbook.nist.gov/chemistry/fluid/), containing several columns with data. The terminal shows the actual content of the file. The first two columns contain the saturation temperature and pressure, and the third one contains the liquid density. First, saturation pressure vs. temperature and the inverse saturation temperature vs. pressure functions are constructed. Also functions of the saturated liquid density as a function of the temperature and of the pressure are constructed by selecting the appropriate columns as the independent and dependent variable. Finally, the partial derivatives of the density with respect to temperature and pressure are defined as continuous functions, with the derivative functional acting on the akima-interpolated data set. Three out of the many possible curves are plotted in this example, giving the optional range to explicitly show how the interpolation works. The original points are also plotted for comparison. More columns could have also been retained from the original data set obtained from [NIST](http://webbook.nist.gov/chemistry/fluid/).
Expand All @@ -96,3 +94,5 @@ include(satwater.term)dnl
![Saturation temperature](Tsat.svg)

![Derivative of density with respect to temperature $\partial \rho/\partial T$](drhodt.svg)

case_nav
24 changes: 14 additions & 10 deletions doc/realbook/007-functions/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

...
---
title: One-dimensional functions
inputs: algebraic inline file vectors satwater
tags: FUNCTION PRINT_FUNCTION MIN MAX STEP VAR FILE FILE_PATH VECTORS NUMBER OUTPUT_FILE INTERPOLATION cspline akima linear sin cos log sqrt derivative integral
---
...

# One-dimensional functions

Expand Down Expand Up @@ -75,7 +75,7 @@ $ wasora inline.was
1.125
1
0.55
$ pyxplot inline.ppl
$ pyxplot inline.ppl; pdf2svg inline.pdf inline.svg; rm -f inline.pdf
$
```

Expand Down Expand Up @@ -156,16 +156,11 @@ $ qdp integrals.dat --ti "linear splines akima" --xlabel "\$x\$" --key "bottom
$
```

![Derivatives](derivatives-dat)
![Derivatives](derivatives-dat.svg)

![Integrals](integrals-dat)
![Integrals](integrals-dat.svg)


-------
:::{.text-center}
[Previous](../006-fibonacci) | [Index](../) | [Next](../)
:::

## satwater.was

This example builds functions of saturated water properties by reading a file, which can be freely downloaded from [NIST](http://webbook.nist.gov/chemistry/fluid/), containing several columns with data. The terminal shows the actual content of the file. The first two columns contain the saturation temperature and pressure, and the third one contains the liquid density. First, saturation pressure vs. temperature and the inverse saturation temperature vs. pressure functions are constructed. Also functions of the saturated liquid density as a function of the temperature and of the pressure are constructed by selecting the appropriate columns as the independent and dependent variable. Finally, the partial derivatives of the density with respect to temperature and pressure are defined as continuous functions, with the derivative functional acting on the akima-interpolated data set. Three out of the many possible curves are plotted in this example, giving the optional range to explicitly show how the interpolation works. The original points are also plotted for comparison. More columns could have also been retained from the original data set obtained from [NIST](http://webbook.nist.gov/chemistry/fluid/).
Expand All @@ -189,6 +184,10 @@ PRINT_FUNCTION drho_dT MIN 300 MAX 500 STEP 2 FILE_PATH drhodt.dat
```bash
$ wasora satwater.was
$ pyxplot satwater.ppl
$ pdf2svg drhodt.pdf drhodt.svg; rm -f drhodt.pdf
$ pdf2svg psat.pdf psat.svg; rm -f psat.pdf
$ pdf2svg Tsat.pdf Tsat.svg; rm -f Tsat.pdf
$
$
```

Expand All @@ -197,3 +196,8 @@ $
![Saturation temperature](Tsat.svg)

![Derivative of density with respect to temperature $\partial \rho/\partial T$](drhodt.svg)

-------
:::{.text-center}
[Previous](../006-fibonacci) | [Index](../) | [Next](../008-integrals)
:::
Binary file removed doc/realbook/007-functions/Tsat.pdf
Binary file not shown.
Loading

0 comments on commit d80ca8a

Please sign in to comment.