Skip to content

Instantly share code, notes, and snippets.

@damyarou
damyarou / 0_reuse_code.js
Created April 10, 2016 12:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@damyarou
damyarou / 0_acc.md
Last active July 23, 2016 02:29
Solution of equation of motion
  • py_eng_acc_nmk.py
  • py_eng_acc_rng.py
  • py_eng_acc_fft.py
  • py_eng_acc_ode.py
@damyarou
damyarou / 0_2D-FEM_calc.md
Last active July 24, 2016 00:09
2A FEM calculation

a_fem.txt

gfortran -o f90_fem_plnt f90_fem_plnt.f90

./f90_fem_plnt inp_arch1.csv out_arch1.csv

python3 py_fem_cont.py out_arch1.csv
python3 py_fem_vect.py out_arch1.csv
@damyarou
damyarou / 0_2D-FEM_etc.md
Last active July 24, 2016 00:13
2D FEM etc.

py_arch.py

from scipy import optimize

def func(x,a1,b1,a2,b2):
    return [a1**2+(b1-x[0])**2-x[1]**2,
            a2**2+(b2-x[0])**2-x[1]**2]
    
#Main routine
@damyarou
damyarou / 0_2D-FEM_fig.md
Last active July 24, 2016 00:27
2D FEM figures

Figures for 2D FEM analysis

@damyarou
damyarou / 0_2D-FEM_mesh.md
Last active July 24, 2016 01:44
2D-FEM: create input data

a_mesh4.txt

gfortran -o f90_fem_mesh4a f90_fem_mesh4a.f90
gfortran -o f90_fem_mesh4b f90_fem_mesh4b.f90
gfortran -o f90_fem_mesh4c f90_fem_mesh4c.f90
gfortran -o f90_gmt_mesh f90_gmt_mesh.f90
gfortran -o f90_num_mesh f90_num_mesh.f90


range=-6/6/175/185
@damyarou
damyarou / 0_python_FEM_2D_frame
Last active December 7, 2016 02:27
2D frame analysis
py_fem_frame.py
py_fig_force.py
inp_01.txt
@damyarou
damyarou / 0_pyhton_FEM_2D_Seepage
Last active December 7, 2016 02:30
2D Seepage flow analysis
py_fem_seep.py
py_seep_cont.py
inp_test0_4.txt
inp_fem_zone4.txt
@damyarou
damyarou / 0_python_FEM_2D_truss.md
Last active December 11, 2016 03:46
2D truss analysis by FEM

py_fem_truss.py

cat << EOT > inp_test1.txt
5  7  1  2  2
1.0  1.0  0.0  0.0  0.0  0.0
1  2  1
1  3  1
2  3  1
2 4 1
@damyarou
damyarou / 0_python_FEM_grid_girder.md
Last active December 14, 2016 00:49
Grid girder analysis by FEM

py_fem_grid.py inp_grid.txt py_grid_model.py a_gmt_model.txt py_grid_result.py a_gmt_result.txt

cat &lt;&lt; EOT &gt; inp_1.txt