I would like to draw a strain-stress hysteresis Loop, something that looks similar to the picture below?

So far I only found this code here:

    \begin{axis}[very thick,
                 samples = 100,
                 xlabel = H,
                 ylabel = B,
                 xmin = -7,
                 xmax = 7,
                 ymin = -4,
                 ymax = 4,
                 axis x line = middle,
                 axis y line = middle,
                 ticks = none]
        \addplot[dashed] plot (\x, 2.5);
        \addplot[dashed] plot (\x,-2.5);
        \addplot[red, name path=A] plot (\x, {5/(1 + exp(-1.7*\x+1.5))-2.5});
        \addplot[red, name path=B] plot (\x, {5/(1 + exp(-1.7*\x-1.5))-2.5});
        \addplot[red!20] fill between[of=A and B];

this example is more in line with magnetic theory than with material science one. My other way is:

        xlabel={$\varepsilon$  $\left[\SI{}{-}\right]$},
        ylabel={$\sigma$ $\left[\SI{}{\newton\per\meter\squared}\right]$},
        xmin=-0.005, xmax=0.065 ,
        ymin=0, ymax=500000000,
        %xtick distance=2000,
        %ytick distance=5,
        grid style=dashed,
        legend pos=north west,
        %title={Fehler der numersichen Berechnung der Impulsbilanz}
        \addplot [dashdotted, red, mark=square*] table [x={epsilon}, y={sigma}] {\A};   
        \addplot [dashed, blue, mark=triangle*] table [x={epsilon}, y={sigma}] {\M};

IFor the last solution I have to use my data file which way to big for my latex folder. In conclusion, the first way is better but it needs adjustment and here I hope you can help me with it.

enter image description here

Any help is greatly appreciated.

  • 1
    Welcome to TeX-SE! What precisely is your question here? I see that you can plot a function, and also see that the output of your first code is a bit different from the function you show on the screen shot. Is your question to find functions that reproduce it more precisely? – user121799 Jul 3 '19 at 16:03
  • Yes, precisely that. – sulphur Jul 3 '19 at 16:25

If you do not know the function, you can just draw some curves that resemble the screen shot you want to reproduce. (Of course you could also draw e.g. two rotated Gaussians.)

 \draw (-4,0) -- (4,0) node[above right]{$\varepsilon$};
 \draw (0,-3) -- (0,5) node[above left]{$\sigma$};
 \draw[very thick,blue] (-4,-4) to (-2.5,0) to[out=70,in=-155]
 (-1,2.5) to[out=25,in=-160] (4,4) to[out=-110,in=70] (2.5,0) 
 to[out=-110,in=25] (1,-2.5) to  cycle;
 \draw[latex-latex] (-4.1,-3) -- (-4.1,3) node[midway,left] {$\Delta\sigma$};
 \draw[dashed] (-2.5,-0.1) -- (-2.5,-4.5) (2.5,-0.1) -- (2.5,-4.5) 
 (-4,-4.1) -- (-4,-5) (4,0) -- (4,-5);
 \draw[latex-latex] (-4,-4.7) -- (4,-4.7) node[midway,below] {$\Delta\varepsilon$};
 \draw[latex-latex] (-4,-4.3) -- (-2.5,-4.3) node[midway,above]  {$\Delta\varepsilon_\tau/2$};
 \draw[latex-latex] (4,-4.3) -- (2.5,-4.3) node[midway,above]  {$\Delta\varepsilon_\tau/2$};
 \draw[latex-latex] (-2.5,-4.3) -- (2.5,-4.3) node[midway,above]  {$\Delta\varepsilon_F/2$};

enter image description here

| improve this answer | |
  • Thank you very much. For a hysterese, you always need a material model, some easier some are very complicated. So again your solution looks perfect for me. – sulphur Jul 4 '19 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.