Commit eef47698 authored by François Trigaux's avatar François Trigaux 🤠
Browse files

🚀 Working Euler-Bernoulli

parent a2c975cd
......@@ -2,3 +2,6 @@ obj/*
bin/*
run/gebt*
run/output*
test.sh
.DS_Store
[Beam]
analysis_flag = 0
nkp = 400
nkp = 11
niter = 1000
nstep = 1
ncond_pt = 2
......
......@@ -2,5 +2,5 @@
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 1.33333333333333E-02 0.00000000000000E+00
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 1.33333333333333E-02
\ No newline at end of file
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 8.00000000000000E-02 0.00000000000000E+00
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 8.00000000000000E-02
\ No newline at end of file
......@@ -12,10 +12,10 @@ nmemb = nkp-1
x = np.linspace(0,1);
q = 1;
w_obj = 0.01;
EI = 6 * q * 1 *(6-4+1)/24 / w_obj;
EI = q * 1 *(6-4+1)/24 / w_obj;
print(EI);
print(1/EI)
w = 6 * q * x*x *(6-4*x+x*x)/24/EI;
w = q * x*x *(6-4*x+x*x)/24/EI;
for k in range(1):
data = np.loadtxt("output%03d.dat"%(k));
......@@ -27,6 +27,8 @@ for k in range(1):
plt.plot(pts[:,0]+pts[:,3],pts[:,5]+pts[:,2],'.-b');
plt.plot(mem[:,0]+mem[:,3],mem[:,5]+mem[:,2],'.r');
print(pts[-1,5]);
plt.plot(x,w,'k');
#plt.axis('scaled');
#plt.xlim([-1,1]);
......
......@@ -88,7 +88,7 @@ void initBeam(Beam *bm)
//ALLOCATE1(bm->time_function, struct TimeFunction, bm-> ntimefun);
for (i = 0; i < bm->nkp; i++) {
bm->coord[i][0] = i * bm->L/((double)bm->nkp);
bm->coord[i][0] = i * bm->L/((double)bm->nmemb);
bm->coord[i][1] = 0.0;
bm->coord[i][2] = 0.0;
}
......
......@@ -18,7 +18,7 @@ int main(int argc, char* argv[])
double *loads = malloc(sizeof(double)*bm->nmemb);
for(i=0;i<bm->nmemb;i++)
{
loads[i] = 1.0;
loads[i] = 100.0;
}
beam_setLoads(bm,loads,2);
printf("...Done!\n");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment