38 this =
this@models.muscle.AMuscleConfig;
55 m.DefaultMu([9 10]) = .1;
57 m.ODESolver.RelTol= 1e-7;
58 m.ODESolver.AbsTol= 1e-7;
65 if elemidx == 1 && faceidx == 2
91 geo = fem.geometry.RegularHex8Grid([0 1],[0 1],[0 1]);
92 geo = geo.toCube27Node;
102 geo = this.
FEM.Geometry;
103 displ_dir(1,geo.Elements(1,geo.MasterFaces(1,:))) =
true;
104 displ_dir(:,geo.Elements(1,geo.MasterFaces(1,5))) =
true;
119 a = models.muscle.tests.NeumannPressure(version);
122 m.setGaussIntegrationRule(4);
125 B = m.System.B.getMatrix(1);
126 res = norm(sum(B) - 1) < 1e-10;
129 f1 = m.getPositionDirichletBCFaceIdx(1,1);
131 maxf = [.1 rand(1,5)*.1];
134 [
t,y] = m.simulate(mu,1);
135 pdf = m.getResidualForces(
t,y);
139 force_l = sum(pdf(f1,:),1);
144 fyend = m.System.f.evaluate(y(:,end),
t(end));
145 res = res && norm(maxf(
k)*B(extfidx) + fyend(extfidx)) < 1e-10;
147 fprintf(
" Ext force on side %g[N] => Force left %gN\n ",...
148 maxf(
k),force_l(end));
149 res = res && norm(maxf(
k)-force_l(end)) < 1e-8;
function configureModel(m)
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...
static function res = test_NeumannPressure()
Tests the force generated by an isometrically fixed muscle.
double T
The final timestep up to which to simulate.
function displ_dir = setPositionDirichletBC(displ_dir)
function P = getBoundaryPressure(elemidx, faceidx)
Determines the neumann forces on the boundary.
function geo = getGeometry()
Single cube with same config as reference element.
Model: Model for a FEM-discretized muscle model.
function anull = seta0(anull)