This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# already stripped out 2-letter words (too short by game rules) | |
# words originally sorted by length and then alphabetically | |
fh = open("wordlist.txt", "r") | |
words = [x.strip() for x in fh.readlines()] | |
fh.close() | |
sides = ["CSV", "EPO", "IFN", "RAD"] # all uppercase (like wordlist) | |
print(f" {sides[0]}") | |
print(f"{sides[3]} {sides[1]}") | |
print(f" {sides[2]}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fipy as fp | |
import numpy as np | |
import matplotlib | |
matplotlib.use('Agg') | |
import matplotlib.pyplot as plt | |
L = 1.0 # domain size | |
nx = 40 # discretization | |
dx = L/nx # h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fipy import Grid1D, CellVariable, FaceVariable, TransientTerm, DiffusionTerm, ExponentialConvectionTerm, ImplicitSourceTerm, Viewer | |
import matplotlib.pyplot as plt | |
import numpy as np | |
L = 10.0 | |
nx = 100 | |
dx = L/nx | |
timeStep = dx/10.0 | |
steps = 150 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fipy import CellVariable, FaceVariable, TransientTerm, DiffusionTerm, Viewer, Grid3D | |
from fipy.meshes.nonUniformGrid3D import NonUniformGrid3D | |
import numpy as np | |
import matplotlib.pyplot as plt | |
FT2M = 0.3048 | |
uniformMesh = True | |
solveLinear = False | |
noViewer = False |