Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding integrated material qois (dissipation for HyperVisco) #77

Merged
merged 22 commits into from
May 14, 2024

Conversation

ralberd
Copy link
Contributor

@ralberd ralberd commented Feb 14, 2024

I quickly added this, but perhaps there are better ways to get these quantities out.

  • Added a uniaxial material point test comparing the computed dissipated energy to the difference between the internal work and free energy.
  • If you plot the energy vs time (in the test), the energy at the end of the unloading cycle is almost all dissipated. Does this make physical sense?

@ralberd ralberd requested a review from cmhamel February 14, 2024 20:47
@ralberd ralberd marked this pull request as draft February 21, 2024 18:18
@ralberd ralberd changed the title [WIP] adding integrated material qois (dissipation for HyperVisco) Adding integrated material qois (dissipation for HyperVisco) Apr 5, 2024
@ralberd ralberd marked this pull request as ready for review April 5, 2024 19:50
@ralberd ralberd marked this pull request as draft April 11, 2024 14:33
Copy link
Collaborator

@btalamini btalamini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Thanks for putting it all together! I found one potential bug; see my comments. It's easy to fix.

Comment on lines 7 to 8
'density','compute_material_qoi'],
defaults=(0.0,))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a bug. The default values for namedtuple are applied from the right, so I think this will now default the value for compute_material_qoi to 0.0 instead of density. I think you should put compute_material_qoi before density?

@cmhamel
Copy link
Collaborator

cmhamel commented May 3, 2024

Don't merge just yet... i"m working on adding a uniaxial strain solution this morning

@cmhamel
Copy link
Collaborator

cmhamel commented May 3, 2024

times_viscous_stretch

We're good on the analytic solution see attached file for the viscous logarithmic strain vs. time. This is using a relaxation time of 10.0s and total loading time of 100.0s. Dots are the optimism solution at a material point and the line is the analytic solution.

@cmhamel
Copy link
Collaborator

cmhamel commented May 3, 2024

Also good in terms of the elastic logarithmic strain for this analytic problem

times_elastic_stretch

@cmhamel
Copy link
Collaborator

cmhamel commented May 3, 2024

Looking good on dissipation as well

times_dissipation

… with a relaxation time of 25.0s and loading time of 100.0s at a strain rate of 1.0e-2. Removed the zero test since this is covered by this test now for time=0s. Will modify later to cover range of strain rates. This will lead to large test times though.
@cmhamel
Copy link
Collaborator

cmhamel commented May 3, 2024

Here the total deformation graident we will write as
which eminates from the deformation gradient

$$\mathbf{F} = \begin{bmatrix} \exp\left(\dot{\varepsilon}t\right) & 0 & 0 \\\ 0 & 1 & 0 \\\ 0 & 0 & 1 \end{bmatrix}$$

The kinematics are given by $\mathbf{F}^e\mathbf{F}^v$ where we assumed that $\det\mathbf{F}^v = 1$ are put in terms of principal values $\det\mathbf{F}^v = \lambda^v_1\lambda^v_2\lambda^v_3 = 1$ where due to symmetry we can assumed that $\lambda^v_2 = \lambda^v_3$ to show that we can write $\mathbf{F}^v$ for this simple motion as follows

$$\mathbf{F}^v = \begin{bmatrix} \lambda^v & 0 & 0 \\\ 0 & \frac{1}{\sqrt{\lambda^v}} & 0 \\\ 0 & 0 & \frac{1}{\sqrt{\lambda^v}} \end{bmatrix}$$

The rate can be written for convenience as

$$\dot{\mathbf{F}}^v = \begin{bmatrix} \dot{\lambda}^v & 0 & 0 \\\ 0 & -\frac{\dot{\lambda}^v}{2\left(\lambda^v\right)^{3/2}} & 0 \\\ 0 & 0 & -\frac{\dot{\lambda}^v}{2\left(\lambda^v\right)^{3/2}} \end{bmatrix}$$

Now calculate $\mathbf{F}^e$ from the above

$$\mathbf{F}^e = \begin{bmatrix} \frac{\exp\left(\dot{\varepsilon}t\right)}{\lambda^v} & 0 & 0 \\\ 0 & \sqrt{\lambda^v} & 0 \\\ 0 & 0 & \sqrt{\lambda^v} \end{bmatrix}$$

Since this motion is rotation free, we can readily write $\mathbf{E}^e = \ln\mathbf{U}^e = \ln\mathbf{F}^e$ where

$$\mathbf{E}^e = \begin{bmatrix} \dot{\varepsilon}t - \ln\lambda^v & 0 & 0 \\\ 0 & \frac{1}{2}\ln\lambda^v & 0 \\\ 0 & 0 & \frac{1}{2}\ln\lambda^v \end{bmatrix}$$

with $\tr\mathbf{E} = \ln\left(\dot{\lambda}t\right)$ so that

$$\dev\mathbf{E}^e = \begin{bmatrix} \frac{2}{3}\dot{\varepsilon}t - \ln\lambda^v & 0 & 0 \\\ 0 & \frac{1}{2}\ln\lambda^v - \frac{1}{3}\dot{\varepsilon}t & 0 \\\ 0 & 0 & \frac{1}{2}\ln\lambda^v - \frac{1}{3}\dot{\varepsilon}t \end{bmatrix}$$

Need to assemble and solve $\dot{\mathbf{F}}^v = \mathbf{D}^v\mathbf{F}^v$ with $\mathbf{D}^v = \frac{1}{\tau}\dev\mathbf{E}^e$

This gives the following equation

$$\dot{\lambda}^v = \left[\frac{2}{3\tau}\dot{\varepsilon}t - \frac{1}{\tau}\ln\lambda^v\right]\lambda^v$$ $$\frac{\dot{\lambda}^v}{\lambda^v} + \frac{1}{\tau}\ln\lambda^v = \frac{2}{3\tau}\dot{\varepsilon}t$$

Set $\varepsilon^v = \ln\lambda^v$ to rewrite the previous equation as

$$\dot{\varepsilon}^v + \frac{1}{\tau}\varepsilon^v = \frac{2}{3\tau}\dot{\varepsilon}t$$

Choose an integrating factor as follows

$$I\left(t\right) = \exp\left(t/\tau\right)$$ $$\exp\left(t/\tau\right)\dot{\varepsilon}^v + \frac{1}{\tau}\exp\left(t/\tau\right)\varepsilon^v = \exp\left(t/\tau\right)\frac{2}{3\tau}\dot{\varepsilon}t$$ $$\varepsilon^v = \frac{2\dot{\varepsilon}}{3\tau}\exp\left(-t/\tau\right)\left[\int_0^t t\exp\left(t/\tau\right) dt\right]$$ $$\varepsilon^v = \frac{2\dot{\varepsilon}}{3\tau}\exp\left(-t/\tau\right)\left[\tau\exp\left(t/\tau\right)\left(t - \tau\right) - \tau\left(0 - \tau\right)\right]$$ $$\varepsilon^v = \frac{2\dot{\varepsilon}}{3}\left[\left(t - \tau\right) + \tau\exp\left(-t/\tau\right)\right]$$ $$\varepsilon^v = \frac{2\dot{\varepsilon}t}{3} - \frac{2\dot{\varepsilon}\tau}{3}\left[1 - \exp\left(-t/\tau\right)\right]$$

If loading stops at $t = t_L$ then $\dot{\varepsilon} = 0$ and we then get the following equation instead

$$\varepsilon^v = \frac{2}{3\tau}\exp\left(-t/\tau\right)\left[\int_0^{t_L} \exp\left(t/\tau\right)\dot{\varepsilon}t dt + \int_{t_L}^t \exp\left(t/\tau\right)\dot{\varepsilon}t_L dt\right]$$ $$\varepsilon^v = \frac{2}{3\tau}\exp\left(-t/\tau\right)\left[\dot{\varepsilon}\int_0^{t_L} t\exp\left(t/\tau\right) dt + \dot{\varepsilon}t_L\int_{t_L}^t \exp\left(t/\tau\right) dt\right]$$ $$\varepsilon^v = \frac{2}{3\tau}\exp\left(-t/\tau\right)\left[\dot{\varepsilon}\tau\exp\left(t_L/\tau\right)\left(t_L - \tau\right) - \dot{\varepsilon}\tau\left(0 - \tau\right) + \dot{\varepsilon}t_L\tau\exp\left(t/\tau\right) - \dot{\varepsilon}t_L\tau\exp\left(t_L/\tau\right)\right]$$

@ralberd ralberd marked this pull request as ready for review May 10, 2024 15:57
…red last and makes compute_material_qoi as default to None. Makes specification of MaterialModel functions explicit in implementations
@cmhamel
Copy link
Collaborator

cmhamel commented May 10, 2024

@ralberd let me know when you're done with this guy. I'll give it a review and smash the merge button.

@cmhamel cmhamel merged commit 6cf4941 into main May 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants