diff --git a/Code/Source/solver/cep_ion.cpp b/Code/Source/solver/cep_ion.cpp index 45c427817..8c91a54fd 100644 --- a/Code/Source/solver/cep_ion.cpp +++ b/Code/Source/solver/cep_ion.cpp @@ -157,7 +157,7 @@ void cep_integ(Simulation* simulation, const int iEq, const int iDof, SolutionSt if (msh.nFn != 0) { Vector sA(msh.nNo); - post::fib_strech(simulation, iEq, msh, solutions, sA); + post::fib_stretch(com_mod, iEq, msh, solutions.current.get_displacement(), sA); for (int a = 0; a < msh.nNo; a++) { int Ac = msh.gN(a); I4f(Ac) = sA(a); diff --git a/Code/Source/solver/consts.h b/Code/Source/solver/consts.h index 5743a13a3..40d81a7d3 100644 --- a/Code/Source/solver/consts.h +++ b/Code/Source/solver/consts.h @@ -342,9 +342,11 @@ enum class OutputNameType outGrp_divV = 521, outGrp_Visc = 522, outGrp_fS = 523, - outGrp_C = 524, + outGrp_C = 524, outGrp_I1 = 525, outGrp_ionicState = 526, + outGrp_fibStretch = 527, + outGrp_fibStretchRate = 528, out_velocity = 599, out_pressure = 598, @@ -373,7 +375,9 @@ enum class OutputNameType out_viscosity = 575, out_fibStrn = 574, out_CGstrain = 573, - out_CGInv1 = 572 + out_CGInv1 = 572, + out_fibStretch = 571, + out_fibStretchRate = 570 }; /// @brief Simulation output file types. @@ -497,4 +501,3 @@ enum class LinearAlgebraType { }; #endif - diff --git a/Code/Source/solver/post.cpp b/Code/Source/solver/post.cpp index 57bbe6194..fbf8278e1 100644 --- a/Code/Source/solver/post.cpp +++ b/Code/Source/solver/post.cpp @@ -3,6 +3,7 @@ #include "post.h" +#include "FE/Common/FEException.h" #include "all_fun.h" #include "fluid.h" #include "fs.h" @@ -17,6 +18,35 @@ namespace post { + namespace { + + Array deformation_gradient(const Array& Nx, const Array& dl, + int nsd, int nNo, int eq_start) + { + auto F = mat_fun::mat_id(nsd); + for (int a = 0; a < nNo; a++) { + if (nsd == 3) { + F(0,0) = F(0,0) + Nx(0,a)*dl(eq_start,a); + F(0,1) = F(0,1) + Nx(1,a)*dl(eq_start,a); + F(0,2) = F(0,2) + Nx(2,a)*dl(eq_start,a); + F(1,0) = F(1,0) + Nx(0,a)*dl(eq_start+1,a); + F(1,1) = F(1,1) + Nx(1,a)*dl(eq_start+1,a); + F(1,2) = F(1,2) + Nx(2,a)*dl(eq_start+1,a); + F(2,0) = F(2,0) + Nx(0,a)*dl(eq_start+2,a); + F(2,1) = F(2,1) + Nx(1,a)*dl(eq_start+2,a); + F(2,2) = F(2,2) + Nx(2,a)*dl(eq_start+2,a); + } else { + F(0,0) = F(0,0) + Nx(0,a)*dl(eq_start,a); + F(0,1) = F(0,1) + Nx(1,a)*dl(eq_start,a); + F(1,0) = F(1,0) + Nx(0,a)*dl(eq_start+1,a); + F(1,1) = F(1,1) + Nx(1,a)*dl(eq_start+1,a); + } + } + return F; + } + + } + void all_post(Simulation* simulation, Array& res, const SolutionStates& solutions, consts::OutputNameType outGrp, const int iEq) { @@ -443,17 +473,8 @@ void div_post(Simulation* simulation, const mshType& lM, Array& res, con vx(2,0) = vx(2,0) + Nx(0,a)*yl(k,a); vx(2,1) = vx(2,1) + Nx(1,a)*yl(k,a); vx(2,2) = vx(2,2) + Nx(2,a)*yl(k,a); - - F(0,0) = F(0,0) + Nx(0,a)*dl(i,a); - F(0,1) = F(0,1) + Nx(1,a)*dl(i,a); - F(0,2) = F(0,2) + Nx(2,a)*dl(i,a); - F(1,0) = F(1,0) + Nx(0,a)*dl(j,a); - F(1,1) = F(1,1) + Nx(1,a)*dl(j,a); - F(1,2) = F(1,2) + Nx(2,a)*dl(j,a); - F(2,0) = F(2,0) + Nx(0,a)*dl(k,a); - F(2,1) = F(2,1) + Nx(1,a)*dl(k,a); - F(2,2) = F(2,2) + Nx(2,a)*dl(k,a); } + F = deformation_gradient(Nx, dl, nsd, eNoN, i); auto Fi = mat_fun::mat_inv(F,3); @@ -468,12 +489,8 @@ void div_post(Simulation* simulation, const mshType& lM, Array& res, con vx(0,1) = vx(0,1) + Nx(1,a)*yl(i,a); vx(1,0) = vx(1,0) + Nx(0,a)*yl(j,a); vx(1,1) = vx(1,1) + Nx(1,a)*yl(j,a); - - F(0,0) = F(0,0) + Nx(0,a)*dl(i,a); - F(0,1) = F(0,1) + Nx(1,a)*dl(i,a); - F(1,0) = F(1,0) + Nx(0,a)*dl(j,a); - F(1,1) = F(1,1) + Nx(1,a)*dl(j,a); } + F = deformation_gradient(Nx, dl, nsd, eNoN, i); auto Fi = mat_fun::mat_inv(F,2); VxFi(0) = vx(0,0)*Fi(0,0) + vx(0,1)*Fi(1,0); @@ -562,31 +579,12 @@ void fib_algn_post(Simulation* simulation, const mshType& lM, Array& res double Jac = 0.0; if (g == 0 || !lM.lShpF) { - auto Nx = lM.Nx.slice(g); - nn::gnn(eNoN, nsd, nsd, Nx, xl, Nx, Jac, F); + auto Nxi = lM.Nx.slice(g); + nn::gnn(eNoN, nsd, nsd, Nxi, xl, Nx, Jac, F); } double w = lM.w(g)*Jac; - auto F = mat_fun::mat_id(nsd); - - for (int a = 0; a < eNoN; a++) { - if (nsd == 3) { - F(0,0) = F(0,0) + Nx(0,a)*dl(i,a); - F(0,1) = F(0,1) + Nx(1,a)*dl(i,a); - F(0,2) = F(0,2) + Nx(2,a)*dl(i,a); - F(1,0) = F(1,0) + Nx(0,a)*dl(j,a); - F(1,1) = F(1,1) + Nx(1,a)*dl(j,a); - F(1,2) = F(1,2) + Nx(2,a)*dl(j,a); - F(2,0) = F(2,0) + Nx(0,a)*dl(k,a); - F(2,1) = F(2,1) + Nx(1,a)*dl(k,a); - F(2,2) = F(2,2) + Nx(2,a)*dl(k,a); - } else { - F(0,0) = F(0,0) + Nx(0,a)*dl(i,a); - F(0,1) = F(0,1) + Nx(1,a)*dl(i,a); - F(1,0) = F(1,0) + Nx(0,a)*dl(j,a); - F(1,1) = F(1,1) + Nx(1,a)*dl(j,a); - } - } + auto F = deformation_gradient(Nx, dl, nsd, eNoN, i); for (int iFn = 0; iFn < 2; iFn++) { for (int i = 0; i < nsd; i++) { auto fN_col = fN.col(iFn); @@ -684,26 +682,7 @@ void fib_dir_post(Simulation* simulation, const mshType& lM, const int nFn, Arra double w = lM.w(g) * Jac; N = lM.N.col(g); - F = mat_fun::mat_id(nsd); - - for (int a = 0; a < eNoN; a++) { - if (nsd == 3) { - F(0,0) = F(0,0) + Nx(0,a)*dl(i,a); - F(0,1) = F(0,1) + Nx(1,a)*dl(i,a); - F(0,2) = F(0,2) + Nx(2,a)*dl(i,a); - F(1,0) = F(1,0) + Nx(0,a)*dl(j,a); - F(1,1) = F(1,1) + Nx(1,a)*dl(j,a); - F(1,2) = F(1,2) + Nx(2,a)*dl(j,a); - F(2,0) = F(2,0) + Nx(0,a)*dl(k,a); - F(2,1) = F(2,1) + Nx(1,a)*dl(k,a); - F(2,2) = F(2,2) + Nx(2,a)*dl(k,a); - } else { - F(0,0) = F(0,0) + Nx(0,a)*dl(i,a); - F(0,1) = F(0,1) + Nx(1,a)*dl(i,a); - F(1,0) = F(1,0) + Nx(0,a)*dl(j,a); - F(1,1) = F(1,1) + Nx(1,a)*dl(j,a); - } - } + F = deformation_gradient(Nx, dl, nsd, eNoN, i); for (int iFn = 0; iFn < lM.nFn; iFn++) { for (int i = 0; i < nsd; i++) { @@ -740,45 +719,38 @@ void fib_dir_post(Simulation* simulation, const mshType& lM, const int nFn, Arra } -/// @brief Compute fiber stretch based on 4th invariant: I_{4,f} +/// @brief Compute fiber stretch based on 4th invariant: λ = sqrt(I_{4,f}) // -void fib_strech(Simulation* simulation, const int iEq, const mshType& lM, const SolutionStates& solutions, Vector& res) +void fib_stretch(const ComMod& com_mod, const int iEq, const mshType& lM, + const Array& lD, Vector& res) { using namespace consts; - auto& com_mod = simulation->com_mod; - auto& cm = com_mod.cm; - auto& cm_mod = simulation->cm_mod; - const auto& lD = solutions.old.get_displacement(); auto& eq = com_mod.eq[iEq]; - int nsd = com_mod.nsd; int tnNo = com_mod.tnNo; int tDof = com_mod.tDof; - - // [NOTE] Setting gobal variable 'dof'. - com_mod.dof = eq.dof; - int eNoN = lM.eNoN; int i = eq.s; - int j = i + 1; - int k = j + 1; - Vector sA(tnNo); - Vector sF(tnNo); - Array xl(nsd,eNoN); + Vector sA(tnNo); + Vector sF(tnNo); + Array xl(nsd,eNoN); Array dl(tDof,eNoN); - Array Nx(nsd,eNoN); - Vector N(eNoN); + Array Nx(nsd,eNoN); for (int e = 0; e < lM.nEl; e++) { - int cDmn = all_fun::domain(com_mod, lM, iEq, e); + int cDmn = all_fun::domain(com_mod, lM, iEq, e); auto cPhys = eq.dmn[cDmn].phys; + if (cPhys != EquationType::phys_struct && cPhys != EquationType::phys_ustruct) { + continue; + } + if (lM.eType == ElementType::NRB) { //CALL NRBNNX(lM, e) } - for (int a = 0; a < eNoN; a++) { + for (int a = 0; a < eNoN; a++) { int Ac = lM.IEN(a,e); xl.set_col(a, com_mod.x.col(Ac)); dl.set_col(a, lD.col(Ac)); @@ -788,40 +760,25 @@ void fib_strech(Simulation* simulation, const int iEq, const mshType& lM, const double Jac = 0.0; Array F(nsd,nsd); if (g == 0 || !lM.lShpF) { - auto Nx = lM.Nx.slice(g); - nn::gnn(eNoN, nsd, nsd, Nx, xl, Nx, Jac, F); + auto Nxi = lM.Nx.slice(g); + Array dummy_ksix(nsd,nsd); + nn::gnn(eNoN, nsd, nsd, Nxi, xl, Nx, Jac, dummy_ksix); } - double w = lM.w(g)*Jac; - auto N = lM.N.col(g); - F = mat_fun::mat_id(nsd); - - for (int a = 0; a < eNoN; a++) { - if (nsd == 3) { - F(0,0) = F(0,0) + Nx(0,a)*dl(i,a); - F(0,1) = F(0,1) + Nx(1,a)*dl(i,a); - F(0,2) = F(0,2) + Nx(2,a)*dl(i,a); - F(1,0) = F(1,0) + Nx(0,a)*dl(j,a); - F(1,1) = F(1,1) + Nx(1,a)*dl(j,a); - F(1,2) = F(1,2) + Nx(2,a)*dl(j,a); - F(2,0) = F(2,0) + Nx(0,a)*dl(k,a); - F(2,1) = F(2,1) + Nx(1,a)*dl(k,a); - F(2,2) = F(2,2) + Nx(2,a)*dl(k,a); - } else { - F(0,0) = F(0,0) + Nx(0,a)*dl(i,a); - F(0,1) = F(0,1) + Nx(1,a)*dl(i,a); - F(1,0) = F(1,0) + Nx(0,a)*dl(j,a); - F(1,1) = F(1,1) + Nx(1,a)*dl(j,a); - } - } + // Compute Deformation Gradient: F = I + grad(u) + F = deformation_gradient(Nx, dl, nsd, eNoN, i); + // Compute fiber stretch based on 4th invariant: I_{4,f} = F.fN.F.fN auto fl = mat_fun::mat_mul(F, lM.fN.rows(0,nsd-1,e)); - double I4f = utils::norm(fl); + double lambda = sqrt(utils::norm(fl)); - for (int a = 0; a < eNoN; a++) { + // L2 projection from integration points to nodes + double w = lM.w(g)*Jac; + auto N = lM.N.col(g); + for (int a = 0; a < eNoN; a++) { int Ac = lM.IEN(a,e); sA(Ac) = sA(Ac) + w*N(a); - sF(Ac) = sF(Ac) + w*N(a)*I4f; + sF(Ac) = sF(Ac) + w*N(a)*lambda; } } } @@ -837,7 +794,33 @@ void fib_strech(Simulation* simulation, const int iEq, const mshType& lM, const res(a) = res(a) + sF(Ac) / sA(Ac); } } +} + +/// @brief Compute fiber stretch rate dλ/dt via backward finite difference. +// +void fib_stretch_rate(const ComMod& com_mod, const int iEq, const mshType& lM, const SolutionStates& solutions, Vector& res) +{ + const double dt = com_mod.dt; + int nNo = lM.nNo; + + if (dt <= 0.0) { + svmp::raise( + SVMP_HERE, + "[fib_stretch_rate] Expected com_mod.dt > 0, but got " + std::to_string(dt) + "."); + } + + if (res.size() != nNo) { + svmp::raise( + SVMP_HERE, + "[fib_stretch_rate] Expected res size " + std::to_string(nNo) + ", but got " + std::to_string(res.size()) + "."); + } + + Vector lambda_old(nNo); + + fib_stretch(com_mod, iEq, lM, solutions.current.get_displacement(), res); + fib_stretch(com_mod, iEq, lM, solutions.old.get_displacement(), lambda_old); + res = (res - lambda_old) / dt; } void post(Simulation* simulation, const mshType& lM, Array& res, const SolutionStates& solutions, @@ -1803,26 +1786,7 @@ void tpost(Simulation* simulation, const mshType& lM, const int m, Array Je = Je + w; auto Im = mat_fun::mat_id(nsd); - auto F = Im; - - for (int a = 0; a < fs.eNoN; a++) { - if (nsd == 3) { - F(0,0) = F(0,0) + Nx(0,a)*dl(i,a); - F(0,1) = F(0,1) + Nx(1,a)*dl(i,a); - F(0,2) = F(0,2) + Nx(2,a)*dl(i,a); - F(1,0) = F(1,0) + Nx(0,a)*dl(j,a); - F(1,1) = F(1,1) + Nx(1,a)*dl(j,a); - F(1,2) = F(1,2) + Nx(2,a)*dl(j,a); - F(2,0) = F(2,0) + Nx(0,a)*dl(k,a); - F(2,1) = F(2,1) + Nx(1,a)*dl(k,a); - F(2,2) = F(2,2) + Nx(2,a)*dl(k,a); - } else { - F(0,0) = F(0,0) + Nx(0,a)*dl(i,a); - F(0,1) = F(0,1) + Nx(1,a)*dl(i,a); - F(1,0) = F(1,0) + Nx(0,a)*dl(j,a); - F(1,1) = F(1,1) + Nx(1,a)*dl(j,a); - } - } + auto F = deformation_gradient(Nx, dl, nsd, fs.eNoN, i); double detF = mat_fun::mat_det(F, nsd); diff --git a/Code/Source/solver/post.h b/Code/Source/solver/post.h index b40daae87..88982d867 100644 --- a/Code/Source/solver/post.h +++ b/Code/Source/solver/post.h @@ -22,7 +22,9 @@ void fib_algn_post(Simulation* simulation, const mshType& lM, Array& res void fib_dir_post(Simulation* simulation, const mshType& lM, const int nFn, Array& res, const SolutionStates& solutions, const int iEq); -void fib_strech(Simulation* simulation, const int iEq, const mshType& lM, const SolutionStates& solutions, Vector& res); +void fib_stretch(const ComMod& com_mod, const int iEq, const mshType& lM, const Array& lD, Vector& res); + +void fib_stretch_rate(const ComMod& com_mod, const int iEq, const mshType& lM, const SolutionStates& solutions, Vector& res); void post(Simulation* simulation, const mshType& lM, Array& res, const SolutionStates& solutions, consts::OutputNameType outGrp, const int iEq); @@ -38,4 +40,3 @@ void tpost(Simulation* simulation, const mshType& lM, const int m, Array }; #endif - diff --git a/Code/Source/solver/set_equation_props.h b/Code/Source/solver/set_equation_props.h index 950a5939f..b797c4a02 100644 --- a/Code/Source/solver/set_equation_props.h +++ b/Code/Source/solver/set_equation_props.h @@ -556,12 +556,13 @@ SetEquationPropertiesMapType set_equation_props = { outPuts = {OutputNameType::out_displacement, OutputNameType::out_stress, OutputNameType::out_cauchy, OutputNameType::out_strain}; //simulation->com_mod.pstEq = true; } else { - nDOP = {12,2,0,0}; - outPuts = { + nDOP = {14,2,0,0}; + outPuts = { OutputNameType::out_displacement, OutputNameType::out_mises, OutputNameType::out_stress, OutputNameType::out_cauchy, OutputNameType::out_strain, OutputNameType::out_jacobian, OutputNameType::out_defGrad, OutputNameType::out_integ, OutputNameType::out_fibDir, - OutputNameType::out_fibAlign, OutputNameType::out_velocity, OutputNameType::out_acceleration + OutputNameType::out_fibAlign, OutputNameType::out_velocity, OutputNameType::out_acceleration, + OutputNameType::out_fibStretch, OutputNameType::out_fibStretchRate }; } @@ -596,7 +597,7 @@ SetEquationPropertiesMapType set_equation_props = { read_domain(simulation, eq_params, lEq, propL); - nDOP = {14, 2, 0, 0}; + nDOP = {16, 2, 0, 0}; outPuts = { OutputNameType::out_displacement, OutputNameType::out_mises, @@ -611,7 +612,9 @@ SetEquationPropertiesMapType set_equation_props = { OutputNameType::out_velocity, OutputNameType::out_pressure, OutputNameType::out_acceleration, - OutputNameType::out_divergence + OutputNameType::out_divergence, + OutputNameType::out_fibStretch, + OutputNameType::out_fibStretchRate }; // Set solver parameters. diff --git a/Code/Source/solver/set_output_props.h b/Code/Source/solver/set_output_props.h index e9b314494..59660ce6f 100644 --- a/Code/Source/solver/set_output_props.h +++ b/Code/Source/solver/set_output_props.h @@ -38,6 +38,8 @@ std::map output_props_map = {OutputNameType::out_fibAlign, std::make_tuple(OutputNameType::outGrp_fA, 0, 1, "Fiber_alignment") }, {OutputNameType::out_fibDir, std::make_tuple(OutputNameType::outGrp_fN, 0, nsd, "Fiber_direction") }, {OutputNameType::out_fibStrn, std::make_tuple(OutputNameType::outGrp_fS, 0, 1, "Fiber_shortening") }, + {OutputNameType::out_fibStretch, std::make_tuple(OutputNameType::outGrp_fibStretch, 0, 1, "Fiber_stretch") }, + {OutputNameType::out_fibStretchRate, std::make_tuple(OutputNameType::outGrp_fibStretchRate, 0, 1, "Fiber_stretch_rate") }, {OutputNameType::out_heatFlux, std::make_tuple(OutputNameType::outGrp_hFlx, 0, nsd, "Heat_flux") }, {OutputNameType::out_integ, std::make_tuple(OutputNameType::outGrp_I, 0, 1, nsd == 2 ? "Area" : "Volume") }, @@ -56,4 +58,3 @@ std::map output_props_map = {OutputNameType::out_vorticity, std::make_tuple(OutputNameType::outGrp_vort, 0, maxNSD, "Vorticity") }, {OutputNameType::out_WSS, std::make_tuple(OutputNameType::outGrp_WSS, 0, maxNSD, "WSS") } }; - diff --git a/Code/Source/solver/vtk_xml.cpp b/Code/Source/solver/vtk_xml.cpp index 818549b3c..8450f7aaa 100644 --- a/Code/Source/solver/vtk_xml.cpp +++ b/Code/Source/solver/vtk_xml.cpp @@ -1293,7 +1293,7 @@ void write_vtus(Simulation* simulation, const SolutionStates& solutions, const b break; case OutputNameType::outGrp_divV: - tmpV.resize(l,msh.nNo); + tmpV.resize(l,msh.nNo); post::div_post(simulation, msh, tmpV, solutions, iEq); for (int a = 0; a < msh.nNo; a++) { d[iM].x(is,a) = tmpV(0,a); @@ -1301,6 +1301,26 @@ void write_vtus(Simulation* simulation, const SolutionStates& solutions, const b tmpV.resize(consts::maxNSD,msh.nNo); break; + case OutputNameType::outGrp_fibStretch: { + Vector res(msh.nNo); + if (msh.nFn != 0) { + post::fib_stretch(simulation->com_mod, iEq, msh, solutions.current.get_displacement(), res); + } + for (int a = 0; a < msh.nNo; a++) { + d[iM].x(is,a) = res(a); + } + } break; + + case OutputNameType::outGrp_fibStretchRate: { + Vector res(msh.nNo); + if (msh.nFn != 0) { + post::fib_stretch_rate(simulation->com_mod, iEq, msh, solutions, res); + } + for (int a = 0; a < msh.nNo; a++) { + d[iM].x(is,a) = res(a); + } + } break; + default: throw std::runtime_error("Undefined output"); break; @@ -1533,4 +1553,3 @@ void write_vtus(Simulation* simulation, const SolutionStates& solutions, const b } }; - diff --git a/tests/cases/struct/uniaxial_block_stretch/BlockStretch.gif b/tests/cases/struct/uniaxial_block_stretch/BlockStretch.gif new file mode 100644 index 000000000..73f7c4717 --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/BlockStretch.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5db6a5c985750cced6062e9903dc89ec0bbc57aa2165a806b3c8c36f579775e1 +size 81267 diff --git a/tests/cases/struct/uniaxial_block_stretch/README.md b/tests/cases/struct/uniaxial_block_stretch/README.md new file mode 100644 index 000000000..d0d34b84f --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/README.md @@ -0,0 +1,16 @@ +This test case simulates uniaxial stretch on a slab of material. The reference solution contains the fiber stretch and fiber stretch rate fields that were obtained analytically. The fiber stretch is computed as $\small \lambda = 1 + \frac{\Delta u}{L_0}$ and the fiber stretch rate is given by $\small \frac{d \lambda}{dt} = \frac{1}{L_0}\frac{\Delta u}{\Delta T}$. Note that $L_0$ is the initial length, $\Delta u$ is the displacement, and $\Delta T$ is the time during which the deformation is applied. + +The plot below shows the analytical and computed fiber stretch. +

+ +

+ +The analytical and computed fiber stretch rates are provided below. +

+ +

+ +The resulting deformation and the fiber stretch values are shown in the video below: +

+ +

diff --git a/tests/cases/struct/uniaxial_block_stretch/fiberstretch.png b/tests/cases/struct/uniaxial_block_stretch/fiberstretch.png new file mode 100644 index 000000000..af52f3af3 --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/fiberstretch.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6858da7b986421b77b92ccf3972d8a325704a8b0f13f0e3084b047792f99112c +size 331355 diff --git a/tests/cases/struct/uniaxial_block_stretch/fiberstretchrate.png b/tests/cases/struct/uniaxial_block_stretch/fiberstretchrate.png new file mode 100644 index 000000000..5da043dfa --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/fiberstretchrate.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c56a5f884a243e765f27d0522cc27d5ac1de167f4005be92ba8aa180f79e684 +size 309911 diff --git a/tests/cases/struct/uniaxial_block_stretch/load.dat b/tests/cases/struct/uniaxial_block_stretch/load.dat new file mode 100644 index 000000000..b40bc41c8 --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/load.dat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09f6500d9c93686d7c623a47890b244cadea9bae9a6546bd27004a6259b5ffb0 +size 22 diff --git a/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-complete.mesh.vtu b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-complete.mesh.vtu new file mode 100644 index 000000000..f09242eb6 --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-complete.mesh.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d74418f571657908b5c4e73f7cc5ce040fd300ac444b1c893ab23001bb6e09ae +size 7499 diff --git a/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/X0.vtp b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/X0.vtp new file mode 100644 index 000000000..904401ad3 --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/X0.vtp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f71480fecee6f177719ab68b14bb2b61bbbce8fc745c87576fd51f3fb0b3ef8 +size 3655 diff --git a/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/X1.vtp b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/X1.vtp new file mode 100644 index 000000000..20b2d0e58 --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/X1.vtp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd46bcf90705c0e062aa658846aacb9091334a56fffac81715631628cd1f097f +size 3669 diff --git a/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Y0.vtp b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Y0.vtp new file mode 100644 index 000000000..19c7f0081 --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Y0.vtp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ef44a9a441563692f58baccf576b3c10e6df4277046d1054db5ab821d498bf0 +size 4795 diff --git a/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Y1.vtp b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Y1.vtp new file mode 100644 index 000000000..7ac40cb0a --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Y1.vtp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d2ad3c14f29583d9d2015b0c0ba681b66c0d2380e4b8851ca30a2cb81773183 +size 4629 diff --git a/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Z0.vtp b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Z0.vtp new file mode 100644 index 000000000..49112c41e --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Z0.vtp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ee78716770c3ed486e5e81d32f90226e215bc095b5cda4f5c708218b84ee407 +size 3188 diff --git a/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Z1.vtp b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Z1.vtp new file mode 100644 index 000000000..22122b6fb --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/mesh/mesh-surfaces/Z1.vtp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2bdc7813853e641c5a71c20f1cea215c9c0215523f51272c5650077614dcb29 +size 3245 diff --git a/tests/cases/struct/uniaxial_block_stretch/result_100.vtu b/tests/cases/struct/uniaxial_block_stretch/result_100.vtu new file mode 100644 index 000000000..1f3632205 --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/result_100.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f954966510318f36048b1b7c44fd9877fa398a497d769c25e8479cad12ea3c9 +size 9844 diff --git a/tests/cases/struct/uniaxial_block_stretch/solver.xml b/tests/cases/struct/uniaxial_block_stretch/solver.xml new file mode 100644 index 000000000..a45270a8d --- /dev/null +++ b/tests/cases/struct/uniaxial_block_stretch/solver.xml @@ -0,0 +1,127 @@ + + + + + 0 + 3 + 100 + 0.01 + 0.50 + STOP_SIM + + 1 + result + 10 + 1 + + 100 + 0 + + 1 + 0 + 0 + + + + + + + mesh/mesh-complete.mesh.vtu + + + mesh/mesh-surfaces/X0.vtp + + + + mesh/mesh-surfaces/X1.vtp + + + + mesh/mesh-surfaces/Y0.vtp + + + + mesh/mesh-surfaces/Y1.vtp + + + + mesh/mesh-surfaces/Z0.vtp + + + + mesh/mesh-surfaces/Z1.vtp + + + (0.0, 0.0, 1.0) + (1.0, 0.0, 0.0) + + 1.0 + + + + + + + true + 1 + 10 + 1e-12 + + 240e6 + 0.45 + + + ST91 + + + true + true + true + true + true + true + true + true + + + + + fsils + + 1e-12 + 600 + + + + Dir + 0.0 + (1, 0, 0) + + + + Dir + 0.0 + (0, 1, 0) + + + + Dir + 0.0 + (0, 0, 1) + false + + + + Dir + Unsteady + load.dat + true + (0, 0, 1) + false + + + + + + + diff --git a/tests/conftest.py b/tests/conftest.py index 7c4a36cab..d2f884c96 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -33,6 +33,8 @@ "VonMises_stress": 1.0e-3, "Vorticity": 1.0e-7, "WSS": 1.0e-8, + "Fiber_stretch": 1.0e-10, + "Fiber_stretch_rate": 1.0e-10, } # Number of processors to test diff --git a/tests/test_struct.py b/tests/test_struct.py index 10188253a..0fecd6425 100644 --- a/tests/test_struct.py +++ b/tests/test_struct.py @@ -110,3 +110,7 @@ def test_tensile_adventitia_Newtonian_viscosity(n_proc): def test_tensile_adventitia_Potential_viscosity(n_proc): test_folder = "tensile_adventitia_Potential_viscosity" run_with_reference(base_folder, test_folder, fields, n_proc, t_max=1) + +def test_uniaxial_block_stretch(n_proc): + test_folder = "uniaxial_block_stretch" + run_with_reference(base_folder, test_folder, ["Fiber_stretch", "Fiber_stretch_rate"], n_proc, t_max=100) \ No newline at end of file