Rigid Body Dynamics Library
MuscleFunctionFactory.h
Go to the documentation of this file.
1#ifndef MUSCLEFUNCTIONFACTORY_H_
2#define MUSCLEFUNCTIONFACTORY_H_
3/* -------------------------------------------------------------------------- *
4 * OpenSim: SmoothSegmentedFunctionFactory.h *
5 * -------------------------------------------------------------------------- *
6 * The OpenSim API is a toolkit for musculoskeletal modeling and simulation. *
7 * See http://opensim.stanford.edu and the NOTICE file for more information. *
8 * OpenSim is developed at Stanford University and supported by the US *
9 * National Institutes of Health (U54 GM072970, R24 HD065690) and by DARPA *
10 * through the Warrior Web program. *
11 * *
12 * Copyright (c) 2005-2012 Stanford University and the Authors *
13 * Author(s): Matthew Millard *
14 * *
15 * Licensed under the Apache License, Version 2.0 (the "License"); you may *
16 * not use this file except in compliance with the License. You may obtain a *
17 * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
18 * *
19 * Unless required by applicable law or agreed to in writing, software *
20 * distributed under the License is distributed on an "AS IS" BASIS, *
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
22 * See the License for the specific language governing permissions and *
23 * limitations under the License. *
24 * -------------------------------------------------------------------------- */
25/*
26 Update:
27 This is a port of the original code so that it will work with
28 the multibody code RBDL written by Martin Felis.
29
30 Author:
31 Matthew Millard
32
33 Date:
34 Nov 2015
35
36*/
37#include "../geometry/SmoothSegmentedFunction.h"
38#include "../geometry/SegmentedQuinticBezierToolkit.h"
39
40#include <cstdio>
41#include <iostream>
42#include <fstream>
43#include <cmath>
44
45
46
152namespace RigidBodyDynamics {
153 namespace Addons {
154 namespace Muscle{
155
157{
158
159
160 public:
161
162 // friend class SmoothSegmentedFunction;
163
164
257 double lce0,
258 double lce1,
259 double lce2,
260 double lce3,
261 double minActiveForceLengthValue,
262 double plateauSlope,
263 double curviness,
264 const std::string& curveName,
266 ::SmoothSegmentedFunction&
267 smoothSegmentedFunctionToUpdate);
268
392 double fmaxE,
393 double dydxC,
394 double dydxNearC,
395 double dydxIso,
396 double dydxE,
397 double dydxNearE,
398 double concCurviness,
399 double eccCurviness,
400 const std::string& curveName,
402 SmoothSegmentedFunction&
403 smoothSegmentedFunctionToUpdate);
404
423 double fmaxE,
424 double dydxC,
425 double dydxNearC,
426 double dydxIso,
427 double dydxE,
428 double dydxNearE,
429 double concCurviness,
430 double eccCurviness,
431 const std::string& muscleName,
433 SmoothSegmentedFunction&
434 smoothSegmentedFunctionToUpdate);
435
500 double phi0,
501 double kiso,
502 double curviness,
503 const std::string& curveName,
505 SmoothSegmentedFunction&
506 smoothSegmentedFunctionToUpdate);
507
578 double cosPhi0,
579 double kiso,
580 double curviness,
581 const std::string& curveName,
583 SmoothSegmentedFunction&
584 smoothSegmentedFunctionToUpdate);
585
586
653 double l0,
654 double kiso,
655 double curviness,
656 const std::string& curveName,
658 SmoothSegmentedFunction&
659 smoothSegmentedFunctionToUpdate);
660
735 double eZero,
736 double eIso,
737 double kLow,
738 double kIso,
739 double curviness,
740 const std::string& curveName,
742 SmoothSegmentedFunction&
743 smoothSegmentedFunctionToUpdate);
744
814 static void createTendonForceLengthCurve(double eIso,
815 double kIso,
816 double fToe,
817 double curviness,
818 const std::string& curveName,
820 SmoothSegmentedFunction&
821 smoothSegmentedFunctionToUpdate);
822
823
824
825
826};
827
828}
829}
830}
831
832#endif //MUSCLEFUNCTIONFACTORY_H_
static void createFiberForceVelocityCurve(double fmaxE, double dydxC, double dydxNearC, double dydxIso, double dydxE, double dydxNearE, double concCurviness, double eccCurviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate)
static void createFiberForceLengthCurve(double eZero, double eIso, double kLow, double kIso, double curviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate)
static void createFiberCompressiveForceLengthCurve(double l0, double kiso, double curviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate)
static void createFiberForceVelocityInverseCurve(double fmaxE, double dydxC, double dydxNearC, double dydxIso, double dydxE, double dydxNearE, double concCurviness, double eccCurviness, const std::string &muscleName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate)
static void createFiberActiveForceLengthCurve(double lce0, double lce1, double lce2, double lce3, double minActiveForceLengthValue, double plateauSlope, double curviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry ::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate)
static void createFiberCompressiveForcePennationCurve(double phi0, double kiso, double curviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate)
static void createFiberCompressiveForceCosPennationCurve(double cosPhi0, double kiso, double curviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate)
static void createTendonForceLengthCurve(double eIso, double kIso, double fToe, double curviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate)