-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy paththermodynamic-potentials-venn-diagram.typ
68 lines (56 loc) · 1.71 KB
/
thermodynamic-potentials-venn-diagram.typ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#import "@preview/cetz:0.3.2"
#import "@preview/cetz-venn:0.1.3": venn3
#set page(width: auto, height: auto, margin: 8pt)
#cetz.canvas({
import cetz.draw: content, circle, scale
// Scale up the diagram
scale(2.5)
// Create Venn diagram with three overlapping circles
venn3(
name: "venn",
a-fill: blue.transparentize(40%), // Mechanical (blue)
b-fill: red.transparentize(40%), // Thermal (red)
c-fill: green.transparentize(40%), // Chemical (green)
ab-fill: purple.transparentize(40%), // Overlap
bc-fill: yellow.transparentize(40%), // Overlap
ac-fill: teal.transparentize(40%), // Overlap
abc-fill: gray.transparentize(70%), // Center
)
// Add outer labels for main potentials
content("venn.a", [Mechanical\ $F_[mu] = -P V$], anchor: "center", name: "mechanical")
content("mechanical.south", text(.8em)[(Grand\ potential)], anchor: "north", padding: (top: 4pt))
content("venn.b", [Thermal\ $H_[mu] = T S$], anchor: "center")
content("venn.c", [Chemical\ $G = mu N$], anchor: "center")
// Add labels for overlapping regions
content(
"venn.ab",
text(.8em, align(center, $U_[mu] =\ T S - P V$)),
anchor: "center",
offset: (0, 0.3),
)
content(
"venn.abc",
text(.8em, align(center, $U = T S -\ P V + mu N$)),
)
content(
"venn.ac",
align(center, $F =\ -P V + mu N$),
anchor: "center",
offset: (-0.3, -0.3),
)
content(
"venn.bc",
align(center, $H =\ T S + mu N$),
anchor: "center",
offset: (0.3, -0.3),
)
// Add outer circle label
content((0, 1.6), $G_[mu]$)
content((0, 1.4), text(.8em)[(Gibbs-Duhem)])
circle(
(0, 0),
radius: 1.75,
fill: rgb(70%, 70%, 90%, 20%),
stroke: rgb(0%, 0%, 0%),
)
})