Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mopolz2 committed Sep 10, 2024
2 parents 49bdbf5 + 7b4e05c commit 78eee69
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
28 changes: 28 additions & 0 deletions cbtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,34 @@ def explore_dir_and_move(home, dir):
with open(os.path.join(home, page), 'w') as file:
file.write(data)

special_rewrites = {
'vectors.html_scalars.html': 'vectors_scalars.html',
"vectors.html_scalars.js": "vectors_scalars.js"
}

for dir in ['dyn', 'sta', 'sol']:
pages = [p for p in os.listdir(os.path.join(home, dir)) if p[-5:] == '.html']
for page in pages:
print(page)
with open(os.path.join(home, os.path.join(dir, page)), 'r') as file:
data = file.read()

for wrong, correct in special_rewrites.items():
data = data.replace(wrong, correct)

with open(os.path.join(home, os.path.join(dir, page)), 'w') as file:
file.write(data)

for page in ['index.html', 'dyn.html', 'sta.html', 'sol.html']:
print(page)
with open(os.path.join(home, page), 'r') as file:
data = file.read()

for wrong, correct in special_rewrites.items():
data = data.replace(wrong, correct)

with open(os.path.join(home, page), 'w') as file:
file.write(data)



2 changes: 1 addition & 1 deletion src/pages/dyn/vector_calculus.astro
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ import DisplayTable from "../../components/DisplayTable.astro"

<ul>
<li>If only \( r \) changes: <InlineEquation equation="\\dot{\\hat{e}}_r = 0" /> and <InlineEquation equation="\\dot{\\hat{e}}_\\theta = 0" /> </li>
<li>If only <InlineEquation equation="\\theta" /> changes: <InlineEquation equation="\\dot{\\hat{e}}_r \neq 0" /> and <InlineEquation equation="\\dot{\\hat{e}}_\\theta \neq 0" /> </li>
<li>If only <InlineEquation equation="\\theta" /> changes: <InlineEquation equation="\\dot{\\hat{e}}_r \\neq 0" /> and <InlineEquation equation="\\dot{\\hat{e}}_\\theta \\neq 0" /> </li>
</ul>
</div>
</Example>
Expand Down
17 changes: 7 additions & 10 deletions src/pages/sol/axial_loading.astro
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,18 @@ import DisplayEquation from "../../components/DisplayEquation.astro"

<SubSection title="Force-Deformation Relation" id="force-deformation_relation">

<DisplayEquation equation='\\delta = \\frac{PL}{EA}\\' title="Force-Deformation relation." background="True" />
<DisplayEquation equation='\\delta = \\frac{PL}{EA}\\' title="Relation." background="True" derivation="True" id="axl-fdr">

<DisplayEquation equation='P = \\sigma A\\' />
<DisplayEquation equation='P = E \\varepsilon A\\' />
<DisplayEquation equation='P = E\\frac{\\delta}{L}A\\' />

</DisplayEquation>

<DisplayEquation equation='\\delta = fP => f = \\frac{L}{EA}\\' title=" Axial flexibility." background="True" />

<DisplayEquation equation='P = k\\delta => k = \\frac{EA}{L}\\' title=" Axial stiffness." background="True" />


<DisplayEquation equation='P = \\sigma A\\' title="Force-Stress relation." id="sts-sss" background="True" derivation="True" >

<DisplayEquation equation='\\sigma = E\\varepsilon\\' />
<DisplayEquation equation='\\varepsilon = \\delta / L\\' />
<DisplayEquation equation='=> P = E\\frac{\\delta}{L}A\\' />

</DisplayEquation>

</SubSection>

<SubSection title="Axially Varying Properties" id="axially_varying_properties">
Expand Down

0 comments on commit 78eee69

Please sign in to comment.