66 this =
this@models.muscle.AMuscleConfig(varargin[:]);
90 m.ODESolver.AbsTol= .1;
94 m.ODESolver.RelTol= .1;
95 m.ODESolver.AbsTol= .1;
98 m.ODESolver.RelTol= .1;
99 m.ODESolver.AbsTol= .1;
126 tmr = zeros(1,size(points,2));
129 ratios = linspace(0,1,4);
131 tmr(points(2,:) >=
k-1 .* points(2,:) <
k) = ratios(
k);
134 tmr(points(3,:) > .66) = 1;
136 tmr = this.
TMRFun(points(2,:),points(3,:));
145 left = y <= cent*(1-zeroperc/2);
146 tmr(left) = 1-y(left)/(cent*(1-zeroperc/2));
147 right = y > cent + this.
ylen*zeroperc/2;
148 tmr(right) = (y(right)-(this.
ylen*(.5+zeroperc/2)))/...
149 (this.
ylen*(.5-zeroperc/2));
169 f = @(z,y)min(1,max(0,-.5+.5./((z/2+.1).*(1.5*y+.08*z+.1))));
170 tmr = f(z,y) + f(6-z,2-y);
175 [
Y,Z] = meshgrid(0:.01:2.1,0:.01:6.1);
179 ax = pm.nextPlot(
" tmr_func ",
" Muscle/Tendon ratio function ");
180 surfc(Z,
Y,tmr,
" Parent ",ax);
190 if any(elemidx == [1 2 7 8]) && faceidx == 3
194 if any(elemidx == 1:4) && faceidx == 3
219 geo = fem.geometry.RegularHex8Grid(0:1,0:4,0:1);
222 geo = fem.geometry.RegularHex8Grid(0:1,0:1,0:1);
225 geo = fem.geometry.RegularHex8Grid(0:2,0:2:6,0:2);
227 if any(this.
Options.Variant == [6 7])
230 geo = fem.geometry.Belly(6,yl,
" Radius ",1,
" InnerRadius ",.2,
" Gamma ",2);
232 geo = geo.toCube27Node;
238 geo = this.
FEM.Geometry;
244 displ_dir(2,geo.Elements(geo.NumElements,geo.MasterFaces(4,:))) =
true;
246 displ_dir(2,geo.Elements([5 6 11 12],geo.MasterFaces(4,:))) =
true;
247 displ_dir(:,geo.Elements(5,geo.MasterFaces(4,9))) =
true;
251 displ_dir(:,geo.Elements([5 6 11 12],geo.MasterFaces(4,:))) =
true;
252 displ_dir(:,geo.Elements([1 2 7 8],geo.MasterFaces(3,:))) =
true;
254 displ_dir(:,geo.Elements(13:16,geo.MasterFaces(4,:))) =
true;
256 displ_dir(:,geo.Elements(1:4,geo.MasterFaces(3,:))) =
true;
257 last = size(geo.Elements,1)-3:size(geo.Elements,1);
258 displ_dir(:,geo.Elements(last,geo.MasterFaces(4,:))) =
true;
276 anull([2 3],:,:) = -1;
288 fprintf(
" Testing MuscleTendonMix Variant %d\n ",k);
289 m = models.muscle.Model(models.muscle.examples.MuscleTendonMix(
" Variant ",k));
function geo = getGeometry()
Returns the intended geometry for this model config.
function addOption(name, default, varargin)
function alpha = getAlphaRamp(ramptime,double alphamax,double starttime)
Creates a linearly increasing scalar function starting at starttime milliseconds ranging from zero to...
function u = getInputs()
Ramp up the external pressure.
PlotManager: Small class that allows the same plots generated by some script to be either organized a...
function P = getBoundaryPressure(elemidx, faceidx)
Determines the neumann forces on the boundary.
static function test_MuscleTendonMix(variant)
function tmr = TMRFun(z,matrix< double > y)
logical LeaveOpen
Flag indicating if the plots should be left open once the PlotManager is deleted (as variable) ...
A variable number of input arguments.
function configureModel(m)
function anull = seta0(anull)
function tmr = getTendonMuscleRatio(points)
Returns the [0,1] ratio between tendon and muscle at all specified points.
function displ_dir = setPositionDirichletBC(displ_dir)
% Dirichlet conditions: Position (fix one side)
MuscleTendonMix(varargin)
Muscle - Tendon mixed geometries.