291 lines
116 KiB
Plaintext
Raw Normal View History

2022-04-07 18:46:57 +02:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Description\n",
"\n",
"This notebook intends to gather all the functionalities you'll have to implement for assignment 2.2.\n",
"\n",
"# Load libraries"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import igl\n",
"import meshplot as mp\n",
"import time\n",
"import torch\n",
"\n",
"import sys as _sys\n",
"_sys.path.append(\"../src\")\n",
"from elasticsolid import *\n",
"from elasticenergy import *\n",
"from vis_utils import *\n",
"from matplotlib import gridspec\n",
"import matplotlib.pyplot as plt\n",
"\n",
"torch.set_default_dtype(torch.float64)\n",
"\n",
"shadingOptions = {\n",
" \"flat\":True,\n",
" \"wireframe\":False, \n",
"}\n",
"\n",
"rot = np.array(\n",
" [[1, 0, 0 ],\n",
" [0, 0, 1],\n",
" [0, -1, 0 ]]\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Load mesh\n",
"\n",
"Several meshes are available for you to play with under `data/`: `ball.obj`, `dinosaur.obj`, and `beam.obj`."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"vNP, _, _, tNP, _, _ = igl.read_obj(\"../data/beam.obj\")\n",
"aabb = np.max(vNP, axis=0) - np.min(vNP, axis=0)\n",
"v = torch.tensor(vNP)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Linear/Non-Linear Elastic Solid\n",
"\n",
"## Instantiation\n",
"\n",
"We first specify the elasticity model to use for the elastic solid, as well as pinned vertices, and volumetric forces."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"rho = 131 # [kg.m-3]\n",
"young = 10e6 # [Pa] \n",
"poisson = 0.2\n",
"force_mass = torch.zeros(size = (3,))\n",
"force_mass[2] = - rho * 9.81\n",
"\n",
"minX = torch.min(v[:, 0])\n",
"pin_idx = torch.arange(v.shape[0])[v[:, 0] < minX + 0.2*aabb[0]]\n",
"\n",
"ee_lin = LinearElasticEnergy(young, poisson)\n",
"ee_neo = NeoHookeanElasticEnergy(young, poisson)\n",
"solid_lin = ElasticSolid(v, tNP, ee_lin, rho=rho, pin_idx=pin_idx, f_mass=force_mass)\n",
"solid_neo = ElasticSolid(v, tNP, ee_neo, rho=rho, pin_idx=pin_idx, f_mass=force_mass)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Validate Elastic Energy Gradient (Elastic Forces) using Finite Differences on Elastic Energy"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD8CAYAAACRkhiPAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8/fFQqAAAACXBIWXMAAAsTAAALEwEAmpwYAABAYElEQVR4nO3deXjc1Xno8e+ZXfu+W7a879jGxgYTiCBAIBDISiBtVhJu0ib3SW7Tliy9TXuT0KZtkrakDaQhayEhG6EsYUmQbWyDFzDYeJdsWbJ2yZJmJM1+7h8zv9GMNFpGI42WeT/P4wfPb7ZzGHlenfO+5xyltUYIIUR6Ms12A4QQQsweCQJCCJHGJAgIIUQakyAghBBpTIKAEEKkMQkCQgiRxiyz3YBEFBcX65qamik/f2BggKysrOlr0CxZKP0A6ctctFD6AdIXw+HDh7u01iXx7ptXQaCmpoZDhw5N+fl1dXXU1tZOX4NmyULpB0hf5qKF0g+QvhiUUo1j3SfTQUIIkcYkCAghRBqTICCEEGlMgoAQQqQxCQJCCJHGJAgIIUQakyAQ5VzXAE63b7abIYQQKSNBIMzrD3L7Ay/xnRfOzHZThBAiZSQIhB292IfT7ef1pt7ZbooQQqSMBIGwA+d6ADjZ5iQYlNPWhBDpQYJA2MHzoSDg8vhpujQ4y60RQojUkCAABIKag+d72FCVC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4sWTHVxRUxjzZR2tMj+Dll53zDVjJFCRFxoJZDssON3jjwQAlpdm09A1ELNe4NeHm3nueDsNXTJCECIdpUUQmIuqCjI41NjD6XYX18eZCoo8Lj9j1HRQt1t
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8/fFQqAAAACXBIWXMAAAsTAAALEwEAmpwYAAA8/0lEQVR4nO3deXycVb348c+ZyUz2Jm227k33nZY2tIACKWtREAWEVgUXpKLi9SJeRb2/H3q9iPensggoVEUEhVIRrwWqLG1DoRTo3qZ0S9u0SdMmTZp9m8zM+f0xS2Ymk2QyS+bJ5Pt+vfpq5pl5njknM/nOme/3POdRWmuEEEIkPlO8GyCEEGJwSMAXQohhQgK+EEIMExLwhRBimJCAL4QQw4QEfCGEGCaS4t2AvuTm5urCwsKw9m1tbSU9PT26DYoT6YvxJEo/QPpiRJH2Y8eOHbVa67zA7YYO+IWFhWzfvj2sfUtKSiguLo5ug+JE+mI8idIPkL4YUaT9UEqdCLbdkCkdpdT1SqnVjY2N8W6KEEIkDEMGfK31K1rrVVlZWfFuihBCJAxDBnwhhBDRJwFfCCGGCQn4QggxTEjAF0KIYWLQAr5SarZS6kml1EtKqa8P1vMKIcRQ4nBqtpzqwumM/tL1IQV8pdTTSqkapVRpwPblSqlDSqkypdR9fR1Da31Aa30XcAtQFH6ThRAicT385mF+t8/GxoM1UT92qCP8Z4DlvhuUUmbgCeBaYA6wUik1Ryk1Xyn1asC/fPc+nwLeBTZErQdCCJEg/lV6msc3lXHp+CSumJ0f9eOrUK94pZQqBF7VWs9z374I+LHW+hr37R8AaK0fDOFYr2mtP9nLfauAVQAFBQWL16xZE1L7ArW0t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
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"solid_lin.update_def_shape(v)\n",
"solid_neo.update_def_shape(v)\n",
"\n",
"fd_validation_elastic(solid_lin)\n",
"fd_validation_elastic(solid_neo)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Validate External Energy Gradient (External Forces) using Finite Differences on External Energy"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAa8AAAD/CAYAAABGkllCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8/fFQqAAAACXBIWXMAAAsTAAALEwEAmpwYAAA4W0lEQVR4nO3deXhc9Z3n+/enFkmWF3kVixcgYQlgwA6JszXLBJJ2aAIkTQg0PZ2ExAn9ZKNn7jM3mc5ckjvJzZDuvt1Dh04GOgxZekyAhLDEQLjPQEjosASCjY1DY0OMZYNlsCVbliXV8r1/nFNSqXRqs0tSneL7eh49Vv3OqVO/Y8nn6+/v9z2/IzPDOeeci5PEdHfAOeecq5cHL+ecc7Hjwcs551zsePByzjkXOx68nHPOxY4HL+ecc7Hjwcs551zsePByzjkXOx68DoOkSyTdJOkuSe+f7v4459wbhaZyhQ1JHcAjQDuQAu4ws2uLtp8E/LjoLW8C/i8z+4dw+83AhUCvmS0/jH6UPY6k1cB/B5LAP5vZf6vhePOAvzWzT5bbZ+HChXbsscceUn8PHDjAzJkzD+m9zcbPpfm0ynmAn0szOtzzeOqpp14zs0UTNpjZlH0BAmaF36eBx4F3ltk3CbwKHFPUdjbwVmBjmfd0A7NL2o6P2C/yOOFnbiUImm3AeuAU4DTg3pKv7qL3/R3w1krnfuaZZ9qheuihhw75vc3Gz6X5tMp5mPm5NKPDPQ/gtxZxTU0dcjg8BGFHBsKX6fCrXOp3HrDVzLYVvf8RScdW+IhzgL+UdIGZDUlaA3w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"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAbAAAAD8CAYAAAAWo/GJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8/fFQqAAAACXBIWXMAAAsTAAALEwEAmpwYAABAtUlEQVR4nO29eZRc1X3v+/lWdfUodWtCCA0gYbAYhBlDAIchhjiAMR6uB4h5zw4ODnk2xr4vzzEJa3HXXY798PO6zyH2w2Gyc4MjrsEDQ2RsxzY4xkAAYYxAYAQISQhJCEnd6rmG3/vjnFNdXV1jd1d1H+n3WauWVLv2Pmfvrur69m/Yvy0zw3Ecx3HiRmKmJ+A4juM4k8EFzHEcx4klLmCO4zhOLHEBcxzHcWKJC5jjOI4TS1zAHMdxnFjSMtMTOJhYtGiRrVy5clJjBwYG6Orqmt4JzRAHyloOlHWAr2U2cqCsA6a2lqeeemq3mR1S6jUXsCaycuVKnnzyyUmNfeihhzjvvPOmd0IzxIGylgNlHeBrmY0cKOuAqa1F0mvlXnMXouM4jhNLXMAcx3GcWOIC5jiO48QSFzDHcRwnlriAOY7jOLHEBcxxHMeJJS5gU0TS+yXdKuleSe+e6fkU0z+SYfPugZmehuM4zrRTs4BJSkp6WtID9fap0H6tpA2SnpP0uYL2z4dtGyStldQuabWk3xY8+grH1IukOyTtkrShqP1CSS9K2iTpi9WuY2Y/MrOrgE8AH53sfBrFPz38Mu/9xq/JZHMzPRXHcZxppR4L7Fpg4yT7TGiXtAa4CjgdOBG4RNLRkpYBnwVOM7M1QBK4zMxeNLOTzOwk4FRgEPhh8Y0kLZY0t6jtqBJz+g5wYVG/JPBN4CLgOOBySceFr50g6YGix+KC4deHY2cVO/uG2T+c4VW3whzHOcCoScAkLQfeA9xWb58KY48FHjOzQTPLAA8DHwhfawE6JLUAncD2orHnAy+bWakd2ucC90pqD+9/FXBTcScz+xWwp6j5dGCTmb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IXoOE5jqFnAJCUlPS3pgXr7VGi/VtIGSc9J+lxB++fDtg2S1kpql7Ra0m8LHn2FY+pF0h2SdknaUNR+oaQXJW2S9MVq1zGzH5nZVcAngI9Odj61kC2OgYUCNpIpJWDjzwKLSCTEod21bWaekgU2EiRxzG1PuQXmOE5DqMcCuxbYOMk+E9olrQGuAk4HTgQukXS0pGXAZ4HTzGwNkAQuM7MXzewkMzsJOBUYBH5YfCNJiyXNLWo7qsScvgNcWNQvCXwTuAg4Drhc0nHhaydIeqDosbhg+PXh2IaRKY6B5S2w2pM4ICjqW0tB37wFVmGzdDkiAetub/EsRMdxGkJNAiZpOfAe4LZ6+1QYeyzwmJkNmlkGeBj4QPhaC9AhqQXoBLYXjT0feNnMXisxlXOBeyW1h/e/CripuJOZ/QrYU9R8OrDJzF4xs1HgLuB9Yf9nzeySoscuBdwI/NjM1pf52bxX0i29vVM7DTmyiMZqIUZJHOUtsDmlBKynnZ01ZBamp2CBRS7Eue0p+obcAnMcZ/qp1QL7OvAFoNKf4uX6lGvfAJwjaaGkTuBiYIWZvQ58DdgCvAH0mtlPi8ZeBqwtNQkzuxt4ELhL0seAK4GPVJh3IcuArQXPt4VtlbgGuAD4kKSry8zpfjP7VE9PT43TKE22RC1EKB8Da21J0NaSnPBaZIFV26AcCWYpF2U1+kcyzGkPkjhGs7mmnALtOM7BRVUBk3QJsMvMnqq3T6WxZrYRuBH4GYHgPANkJM0nsHpWAUuBLklXFFyzFbgUuLvcfMzsq8AwcDNwqZn1V1tndPlSl6s0wMxuMrNTzexqM/tWjfeZFPksxGT1LMS+4cyEDMSIJT3tDKdzVS2jyboQRzJZ0lkLXIgdQRKJx8Ecx5luarHA3gl
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"maxX = torch.max(v[:, 0])\n",
"f_point_idx = torch.arange(v.shape[0])[v[:, 0] > maxX - 0.01*aabb[0]]\n",
"\n",
"f_point = torch.zeros(size=(f_point_idx.shape[0], 3))\n",
"f_point[:, 2] = -5e3\n",
"\n",
"solid_lin.add_point_load(f_point_idx, f_point)\n",
"solid_neo.add_point_load(f_point_idx, f_point)\n",
"\n",
"solid_lin.update_def_shape(v)\n",
"solid_neo.update_def_shape(v)\n",
"\n",
"fd_validation_ext(solid_lin)\n",
"fd_validation_ext(solid_neo)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 4.4.5 Point Force\n",
"\n",
"I tried adding a call to `make_external_energy` in the `add_point_load` function since a new force would also lead to a different energy. However inside `make_external_energy`, after many tries to add the energy corresponding to the point force, I gave up."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Validate Elastic Energy Force Differentials (Elastic Forces) using Finite Differences on Elastic Forces"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD8CAYAAACRkhiPAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8/fFQqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAoWklEQVR4nO3deXxU1f3/8deZyUYSCJJA2EPCjiwCYRPBBBegglTcQOuGStW6fPtr3bVq1aKtdnOpe1GrUItLKSIqQmQRZJctLGGTQEIIWwgQEpLz+yNxIJBASCa5s7yfjwePzj03M/P+OI/mkzP33nONtRYREQlOLqcDiIiIc9QERESCmJqAiEgQUxMQEQliagIiIkFMTUBEJIiFOB3gbMTFxdk2bdo4HeO0Dh06RFRUlNMxvCJQagmUOkC1+CJ/qGPp0qW51trGFe3zqybQpk0blixZ4nSM00pLSyMlJcXpGF4RKLUESh2gWnyRP9RhjNlW2T59HSQiEsTUBEREgpiagIhIEFMTEBEJYmoCIiJBTE1ARCSIBVUTWJ99kIKiYqdjiIj4jKBoAnkFRbz+7SaG/nUOD0xZ6XQcERGfERRNYNm2fUz4Y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tI1+ex6fLdzicTkR8gZpAgHv2iq58cFs/bhmYSFx0OO8v3AbAN+t2OZxMRHyBmkCAqx8RysB2cbhdhsHt4wCICHUxd0Muew8VOpxORJymJhBERvZoTlx0GA8P78zBo8fo9fTXbNx1EEDLUYsEKTWBIJLaqQlLHruE0b1aeMYmLdrO9FVZ9H5mphahEwlCagJBqH5EKJPH96d/UiPeXbCVp6etBeCKV79jXXaew+l
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8/fFQqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAlkElEQVR4nO3dd3gVZd7/8fedhCQQEkqAAKEEpEhvIQFrWHVBxYIdEUGarm11d33U1V11Vxfbs78VZVeQXqToog9NcS2xAknoXTqJAUINSSAh5f79EcBshBA452RO+byui+tiJpOZ77lJPsyZM3N/jbUWERHxf0FOFyAiIlVDgS8iEiAU+CIiAUKBLyISIBT4IiIBQoEvIhIgQpwuoCL16tWzcXFxTpfhFnl5eURERDhdhtfS+FRM43N+GqOfrVix4qC1tn759V4d+HFxcaSlpTldhlskJyeTlJTkdBleS+NTMY3P+WmMfmaM2X229bqkIyISIBT4IiIBQoEvIhIgFPgiIgFCgS8iEiAU+CIiAUKBLyLiRQ7lFrBkwz6OHj/p9n0r8EVEvMjan7J5cPoKth/Ic/u+FfgiIl5k79F8ABrVCnf7vhX4IiJeZG/2CYIMNIgMc/u+FfgiIl4k82g+MVHhhAS7P54V+CIiXmRv9gmPXM4BBb6IiFfZm51Po1rVPbJvBb6IiJew1pJ5VGf4IiJ+7+jxQgqKSmhUW2f4IiJ+bWtWLgDN69bwyP4V+CIiXmLVniMAdG1W2yP7V+CLiHiJVXu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/tjOGJ6kNbhRT4IlJlyvehbRAV7nRJAaXKAt8Yk2SM+dYY864xJqmqjisi3kF9aJ1XqcA3xkwyxmQ
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"solid_lin.update_def_shape(v)\n",
"solid_neo.update_def_shape(v)\n",
"\n",
"fd_validation_elastic_differentials(solid_lin)\n",
"fd_validation_elastic_differentials(solid_neo)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 4
}