From 2d5bcb28d207c739847304aa2ae455679a466458 Mon Sep 17 00:00:00 2001 From: "Ryan C. Cooper" Date: Fri, 7 Apr 2017 17:19:32 -0400 Subject: [PATCH] added final project --- final_project/README.md | 103 ++++++ final_project/beam.png | Bin 0 -> 11561 bytes final_project/beam.svg | 615 ++++++++++++++++++++++++++++++++++++ final_project/rubric.md | 27 ++ lecture_20/lecture_20.ipynb | 543 ++++++++++++++++--------------- 5 files changed, 1014 insertions(+), 274 deletions(-) create mode 100644 final_project/README.md create mode 100644 final_project/beam.png create mode 100644 final_project/beam.svg create mode 100644 final_project/rubric.md diff --git a/final_project/README.md b/final_project/README.md new file mode 100644 index 0000000..cee3ee3 --- /dev/null +++ b/final_project/README.md @@ -0,0 +1,103 @@ +# ME 3255 - Final Project +## Due May 1 by 11:59pm + +In this project you are going to solve for the shape of a beam under different loading +conditions. The shape of the beam varies along the x-axis and as a function of time. + +Notes: Label the plots with legends, x- and y-axis labels and make sure the plots are easy +to read (you can use the `setdefaults.m` script we have used in class). All functions +should have a help file and your README.md should describe each file in your repository +and provide a description of each problem and each solution (use `#`-headings in your file +to show the start of new problems) + +You will be graded both on documentation and implementation of the solutions. + +![Diagram of beam and loading conditions](beam.png) + +We will use the Euler-Bernoulli beam equation to describe the shape of the beam, the +differential equation that governs the solution is: + +$\frac{\partial^4 w}{\partial x^4}-\frac{P}{EI}\frac{\partial^2 w}{\partial +x^2}+\frac{\rho A}{EI}\frac{\partial^2 w}{\partial t^2}=q(x)$ (1) + +Where w(x,t) is the displacement of the beam away from the neutral axis as a function of +position along the beam, x, and time, t, P is the transverse loading of the beam, E is the +Young's modulus, I is the second moment of Inertia of the beam, $\rho$ is the density, A +is the cross-sectional area, and q(x) is the transverse distributed load (for a uniform +pressure, it is the applied pressure times the width of the beam, in units of +force/length). + +We can separate the function $w(x,t)=w(x)e^{i\omega t}$, now equation (1) becomes + +$\left(\frac{\partial^4 w}{\partial x^4}-\frac{P}{EI}\frac{\partial^2 w}{\partial +x^2}-\frac{\rho A \omega^{2}}{EI}w\right)e^{i\omega t}=\frac{q(x)}{EI}$ (2) + +For the simply-supported beam shown in Figure 1, the boundary conditions are: + +$w(0)=w(L)=0$ + +$w''(0)=w''(L)=0$ + +The material is aluminum, E=70 GPa, $\rho$=2700 kg/m$^3$. The bar is 1-m-long with a base +width, b=0.1 m, and height, h=0.01 m, and the second moment of inertia, +I=$\frac{bh^3}{12}$. + +1. Analytically solve for the shape of the beam if q(x)=cst, P=0, and $\omega$=0 and +create a function called `shape_simple_support.m` that returns the displacement w(x) given +q and x + +``` +w=shape_simple_support(x,q); +``` + +a. Plot q vs the maximum deflection, $\delta x$, of the beam + +b. Use a Monte Carlo model to determine the mean and standard deviation for the +maximum deflection $\delta x$ if b and h are normally distributed random variables +with 0.1 % standard deviations at q=50 N/m. + +3. Now use the central difference approximation to set up a system of equations for the +beam for q(x)=cst, P=0, and $\omega=0$. Use the boundary conditions with a numerical +differentiation to determine the valuea of the end points + + a. set up the system of equations for 6 segments as a function of q + + b. set up the system of equations for 10 segments as a function of q + + c. set up the system of equations for 20 segments as a function of q + + d. solve a-c for q=1,10,20,30,50 and plot the numerical results of q vs $\delta x$ + + e. Comment on the results from the analytical and numerical approaches (if you used + functions then provide help files, if you used scripts, then describe the steps used) + +4. Now set up the system of equations using a central difference method if P>0 and +$\omega=0$ + + a. set up the system of equations for 6 segments as a function of q and P + + b. set up the system of equations for 10 segments as a function of q and P + + c. set up the system of equations for 20 segments as a function of q and P + + d. solve a-c for q=1,10,20,30,50 and plot the numerical results of q vs $\delta x$ for + P=0, 100, 200, 300 (4 lines, labeled as P=0,P=100,...) + +5. Now set up an eigenvalue problem to solve for the natural frequencies of the simply +supported beam if P=0 and q=0. + + a. set up the system of equations for 6 segments + + b. set up the system of equations for 10 segments + + c. set up the system of equations for 20 segments + + d. solve for the natural frequencies ($\omega_{1}$, $\omega_{2}$,...) + + e. Plot the shape of the beam for the first 3 natural frequencies + +6. (Bonus 5pt) Create a function to return the system of equations for the eigenvalue +problem as a function of P, if P>0. Then, plot the lowest natural frequency vs the applied +load P. + + diff --git a/final_project/beam.png b/final_project/beam.png new file mode 100644 index 0000000000000000000000000000000000000000..271d6140c1114cc1fd2037b77fd792a6c5c12728 GIT binary patch literal 11561 zcmd6N2UC;Z6K)8-7wKIDQE4K*qk@1)5d{KBZz8>hUPU^H2uN3H3IP&nl2AgIUWFh8 zPz0nU^aMiS=J%huAK}j2GxN4R{oOsg&pEp(rp9`Vbi8x`0D#dzU&jmpAbUxA->0D> z-KDB8O-K)lzy}7;X-FxO#wD5bP3xy`6$k*Z1^suCExQSYl88J(x}czEzHUKa#{gFV z7z~#7@bL_EcJyM-At=^)2Jq$zJO-LE^$WC+`6r6nNGD zO4aF1m&88dd;$hm^gf<00k9e{QvR!NV88=H=|04or>E*GO+HIihBqc6zarH@v387+ z^y>8LRFeAk(>fJ5;K8wi@_ws4hIumXo7W%OjSLNW0Q^4sW4P?w873PbUJhN~zGY91 z5J!ej(={J){klqYxEmTE%C^9SVnV60(-Bp<8Q$>m@>Y>6m4e4rPQ?2AtL*}N8LP=J z&ZiBTyZvtt^2Y=ohYb3U&t3k~;vlH)|5i|1iWQx!BR_sqSXe@4VQGHCnE1dEFzC;} zDjZu_Soqmbc}XT*g)Qa1u24Dso=_0KID3b$GCz|_<~2YFRVF@Y4l*&ADJYPxY9Y*G zGs;0DzaWT!5SwGZoq~aJm}TaN*89S%fP|Tnx9k$g;ZJ;VjG(k!T%0|SeCC66cHVRH z%?dTvf*PC6j}gfaRuvpo4-aTW#=&*wex<-ppRc|D*A|6h#Pb0U(rm+~04Hd9Y^J zF;eG|P0SGG(%8h371V6fO90K<9;(+wMT~Y6PeO^@gs5dboKTtF3wOt{Q4F~z`5c*L zm4a?vATV#If&4VNQ9}s7gx(xCev+?$Z!d|%vz_diDwBdY)^obx))s$990$@Hd4l3N zXVw;bn?DfLJa^?t7OHt__ZhwEQx(Ya;{+8s_;_Kr2mazhp<4(yYVAE2Pwtj zBCd}kap98g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4x#^Trf8B$drMaxZSO` z%~jKpl$FWJO+B|kcZpH&GA&anFWSC5%+a_0moy)x9=Bf6+SKGMkqgWR3IQ?kY9zQ4 literal 0 HcmV?d00001 diff --git a/final_project/beam.svg b/final_project/beam.svg new file mode 100644 index 0000000..b02b62d --- /dev/null +++ b/final_project/beam.svg @@ -0,0 +1,615 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + q(x) + P + P + + + w(x) + + + x + y + + diff --git a/final_project/rubric.md b/final_project/rubric.md new file mode 100644 index 0000000..08248bd --- /dev/null +++ b/final_project/rubric.md @@ -0,0 +1,27 @@ +# Grading Rubric + +| Component | Grade | Description | +| --------- |------ |--------------------------------- | +|Solutions | 50 % | Problems are solved correctly and solution makes sense | +|Documentation| 30 % | All files have comments and all functions have help files | +|Problem Statements | 10% | Descriptions of each problem and the approach | +|Team Work | 10% | Each group member made commits to repository| +|Github Bonus | 5% | If a group member opens an [issue](https://guides.github.com/features/issues/) and you commit code to close it| + +The Documentation and Problem Statements will be assessed based upon the included m-files +and the main README.md documentation. This is a final report, so make sure the README.md +is easy to understand with headers (`#`, `##`, ...) to start each problem and sub-problem. + +The Solutions will be graded based upon correctness and the approach. The plots will be +graded based upon the axis labels, titles, legend, correctness, and design. +If you are asked to solve for a value, you can choose to put it in a table or in a +paragraph, but it must be easy to read/understand. + +The Team Work section is meant to demonstrate working knowledge of Github (now as a +collaborative project). If everyone makes commits to the project, then you will receive +credit. + +The Github Bonus requires extra reading. Create an issue and tag your group member. That +group member can then respond and *fix* the issue with a commit. This is a bonus 5pts (on +an individual basis, for everyone to get credit, everyone in the group would need to close +an issue) diff --git a/lecture_20/lecture_20.ipynb b/lecture_20/lecture_20.ipynb index 50f858a..da8c4ac 100644 --- a/lecture_20/lecture_20.ipynb +++ b/lecture_20/lecture_20.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 152, "metadata": { "collapsed": true }, @@ -13,7 +13,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 153, "metadata": { "collapsed": true }, @@ -97,17 +97,19 @@ "source": [ "# Integrals in practice\n", "\n", - "### Example: Compare toughness of two steels\n", + "### Example: Compare toughness of Stainless steel to Structural steel\n", "\n", "![Stress-strain plot of steel](steel_psi.jpg)\n", "\n", + "### Step 1 - G3Data to get points \n", + "\n", "Use the plot shown to determine the toughness of stainless steel and the toughness of structural steel.\n", "\n" ] }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 154, "metadata": { "collapsed": false }, @@ -162,7 +164,7 @@ }, { "cell_type": "code", - "execution_count": 147, + "execution_count": 155, "metadata": { "collapsed": false }, @@ -347,7 +349,7 @@ }, { "cell_type": "code", - "execution_count": 148, + "execution_count": 156, "metadata": { "collapsed": false }, @@ -429,7 +431,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 157, "metadata": { "collapsed": true }, @@ -448,7 +450,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 159, "metadata": { "collapsed": false }, @@ -457,12 +459,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "ans = 3.5000\r\n" + "ans = 6.6250\r\n" ] } ], "source": [ - "gauss_1pt(f1,2,3)" + "gauss_1pt(f2,2,3)" ] }, { @@ -496,7 +498,7 @@ }, { "cell_type": "code", - "execution_count": 149, + "execution_count": 164, "metadata": { "collapsed": false }, @@ -507,7 +509,13 @@ "text": [ "ans = 6.6667\n", "ans = 6.6667\n", - "ans = 6.6667\n" + "ans = 6.6667\n", + "f_c =\n", + "\n", + "@(x) cosh (x / 30) + exp (-10 * x) .* erf (x)\n", + "\n", + "ans = 2.0048\n", + "ans = 2.0048\n" ] } ], @@ -515,7 +523,11 @@ "% integral of quadratic\n", "quad(f2,2,3)\n", "quadl(f2,2,3)\n", - "f3(3)-f3(2)" + "f3(3)-f3(2)\n", + "f_c=@(x) cosh(x/30)+exp(-10*x).*erf(x)\n", + "\n", + "quad(f_c,1,3)\n", + "quadl(f_c,1,3)" ] }, { @@ -531,7 +543,7 @@ }, { "cell_type": "code", - "execution_count": 82, + "execution_count": 165, "metadata": { "collapsed": false }, @@ -682,7 +694,7 @@ "\t\n", "\tgnuplot_plot_2a\n", "\n", - "\t\n", + "\t\n", "\t\n", "\n", "\n", @@ -713,7 +725,7 @@ }, { "cell_type": "code", - "execution_count": 98, + "execution_count": 166, "metadata": { "collapsed": false }, @@ -767,31 +779,36 @@ "\n", "\n", "\t\t\n", + "\t\t-2\n", + "\t\n", + "\n", + "\n", + "\t\t\n", "\t\t-1.5\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t-1\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t-0.5\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t0\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t0.5\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t1\n", "\t\n", "\n", @@ -860,11 +877,11 @@ "\n", "\n", "\n", - "\t\n", + "\t\n", "\t\n", "\tgnuplot_plot_2a\n", "\n", - "\t\n", + "\t\n", "\t\n", "\n", "\n", @@ -919,7 +936,7 @@ }, { "cell_type": "code", - "execution_count": 99, + "execution_count": 168, "metadata": { "collapsed": false }, @@ -973,31 +990,36 @@ "\n", "\n", "\t\t\n", + "\t\t-2\n", + "\t\n", + "\n", + "\n", + "\t\t\n", "\t\t-1.5\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t-1\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t-0.5\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t0\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t0.5\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t1\n", "\t\n", "\n", @@ -1070,7 +1092,7 @@ "\t\n", "\n", "\n", - "\t\n", + "\t\n", "\t\n", "\tno change\n", "\n", @@ -1079,7 +1101,7 @@ "\t\n", "\n", "\n", - "\t\n", + "\t\n", "\t\n", "\n", "\n", @@ -1110,7 +1132,7 @@ }, { "cell_type": "code", - "execution_count": 100, + "execution_count": 169, "metadata": { "collapsed": false }, @@ -1119,7 +1141,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "a = 0.99838\r\n" + "a = 1.0007\r\n" ] }, { @@ -1259,11 +1281,11 @@ "\n", "\n", "\n", - "\t\n", + "\t\n", "\t\n", "\tgnuplot_plot_2a\n", "\n", - "\t\n", + "\t\n", "\t\n", "\n", "\n", @@ -1554,39 +1576,7 @@ }, { "cell_type": "code", - "execution_count": 120, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "a =\n", - "\n", - " 1 2 3 4 5\n", - "\n", - "pa =\n", - "\n", - " 2 1 1 2 3 4 5 5 4\n", - "\n", - "ans =\n", - "\n", - " 1 9\n", - "\n" - ] - } - ], - "source": [ - "a=[1,2,3,4,5]\n", - "pa=[a(4/2:-1:1) a a(end:-1:end-4/2+1)]\n", - "size(pa)" - ] - }, - { - "cell_type": "code", - "execution_count": 137, + "execution_count": 170, "metadata": { "collapsed": false }, @@ -1738,111 +1728,111 @@ "\n", "\n", "\n", - "\t\n", + "\t\n", "\t\n", "\tgnuplot_plot_2a\n", "\n", "\t \n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", "\n", "\t\n", "\n", @@ -1879,7 +1869,7 @@ }, { "cell_type": "code", - "execution_count": 138, + "execution_count": 171, "metadata": { "collapsed": false }, @@ -1933,31 +1923,36 @@ "\n", "\n", "\t\t\n", + "\t\t-2\n", + "\t\n", + "\n", + "\n", + "\t\t\n", "\t\t-1.5\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t-1\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t-0.5\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t0\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t0.5\n", "\t\n", "\n", "\n", - "\t\t\n", + "\t\t\n", "\t\t1\n", "\t\n", "\n", @@ -2026,113 +2021,113 @@ "\n", "\n", "\n", - "\t\n", + "\t\n", "\t\n", "\tgnuplot_plot_2a\n", "\n", - "\t\n", + "\t\n", "\t\n", "\tgnuplot_plot_3a\n", "\n", "\t \n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", - "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", "\n", "\t\n", "\n",