Skip to content

Abaqus tutorial updates #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion A_Getting_started_anyscript/lesson1.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ model.
You will notice "Todo:" comments inside the braces, to which we will return
later.

:::{note} The model objects that you create henceforth must be placed within the
:::{note}
The model objects that you create henceforth must be placed within the
"ArmModel" folder and should go between its pair of braces.
:::

Expand Down
2 changes: 2 additions & 0 deletions AnyExp4SOLIDWORKS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

# Making Models using SOLIDWORKS

(Making Models using SOLIDWORKS)=

This tutorial shows how a CAD model designed in SOLIDWORKS can be
imported into AnyBody and interact with the human model. This allows for
analysis and optimization of the ergonomics of products.
Expand Down
Binary file not shown.
32,600 changes: 31,695 additions & 905 deletions Finite_element_analysis/Downloads/clavicula.inp

Large diffs are not rendered by default.

103 changes: 103 additions & 0 deletions Finite_element_analysis/Snippets/Lesson3/AbaqusInterface1.main.any
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
//expect_errors = ["'<ObjectName>'", "Model loading skipped"]

#include "libdef.any"

Main =
{
// BodyModel configuration:
// Specify which limb segments to include, the type of muscles, joints, scaling etc
#include "Model/BodyModelConfiguration.any"

// Include the Human model from AMMR
#include "<ANYBODY_PATH_BODY>\HumanModel.any"

// Define desired posture or movement of the model
#include "Model\Mannequin.any"

// Compose the model used by the study
AnyFolder Model =
{
// Center of Mass (COM) position in the ground YZ plane
// COM balance driver can be excluded with:
// #define EXCLUDE_COM_BALANCE_DRIVERS
AnyVector CenterOfMassXZ = {0,0};

// Positioning of the right and left feet.
// Ground-foot constraints can be excluded with:
// #define EXCLUDE_FOOT_CONSTRAINTS
Environment.GlobalRef.RightFootPrint = {
AnyVec3 HeelPosition = {-0.08, 0, 0.14};
AnyVec3 ToeDirection = {1, 0, 0.1};
};
Environment.GlobalRef.LeftFootPrint = {
AnyVec3 HeelPosition = {-0.08, 0, -0.14};
AnyVec3 ToeDirection = {1, 0, -0.1};
};

// Include the body part of the Human model
AnyFolder &BodyModel = .HumanModel.BodyModel;

// Include the default mannequin drivers
AnyFolder &DefaultMannequinDrivers = .HumanModel.DefaultMannequinDrivers;

// Environment files are used to include objects surrounding human,
// e.g. global reference frame
#include "Model\Environment.any"

AnyFolder ModelEnvironmentConnection =
{
// This file contains all contraints to simulate the standing human
#include "Model/JointsAndDrivers.any"

// Ground reaction force prediction
#include "Model/GRFPrediction.any"
};
};
// Define Study for running kinematics and inverse dynamics simulation analyses
//# BEGIN SNIPPET 1
AnyBodyStudy Study =
{
// Include the Model within the Study
AnyFolder &Model = .Model;

§tEnd = 10.0;§
Gravity={0.0, -9.81, 0.0};
nStep = §5§;
//# END SNIPPET 1

//# BEGIN SNIPPET 2
AnyMechOutputFileForceExport <ObjectName> =
{
FileName = "";
/*NumberFormat =
{
Digits = 15;
Width = 23;
Style = ScientificNumber;
FormatStr = "";
};*/
//UseRefFrameOnOff = Off;
//AllSegmentsInStudyOnOff = Off;
//XMLformatOnOff = Off;
//RefFrame = Null;
//Segments = ;
//MeshRefFrames = ;
//ForceObjectExclude = ;
//ForceObjectList = ;
//AnyRefFrame &<Insert name0> = <Insert object reference (or full object definition)>;
//AnyRefFrame &<Insert name1> = <Insert object reference (or full object definition)>; You can make any number of AnyRefFrame objects!
//AnySeg &<Insert name0> = <Insert object reference (or full object definition)>;
//AnySeg &<Insert name1> = <Insert object reference (or full object definition)>; You can make any number of AnySeg objects!
};
//# END SNIPPET 2

// Overdeterminate solver is needed while using the
// soft default mannequin drivers.
Kinematics.SolverType = KinSolOverDeterminate;
InitialConditions.SolverType = Kinematics.SolverType ;
};
// This is readymade simulation package including some pre-processing steps and the InverseDynamics analysis
#include "Model\RunAppSequence.any"

}; //Main

Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#include "libdef.any"

Main =
{
// BodyModel configuration:
// Specify which limb segments to include, the type of muscles, joints, scaling etc
#include "Model/BodyModelConfiguration.any"

// Include the Human model from AMMR
#include "<ANYBODY_PATH_BODY>\HumanModel.any"

// Define desired posture or movement of the model
#include "Model\Mannequin.any"

// Compose the model used by the study
AnyFolder Model =
{
// Center of Mass (COM) position in the ground YZ plane
// COM balance driver can be excluded with:
// #define EXCLUDE_COM_BALANCE_DRIVERS
AnyVector CenterOfMassXZ = {0,0};

// Positioning of the right and left feet.
// Ground-foot constraints can be excluded with:
// #define EXCLUDE_FOOT_CONSTRAINTS
Environment.GlobalRef.RightFootPrint = {
AnyVec3 HeelPosition = {-0.08, 0, 0.14};
AnyVec3 ToeDirection = {1, 0, 0.1};
};
Environment.GlobalRef.LeftFootPrint = {
AnyVec3 HeelPosition = {-0.08, 0, -0.14};
AnyVec3 ToeDirection = {1, 0, -0.1};
};

// Include the body part of the Human model
AnyFolder &BodyModel = .HumanModel.BodyModel;

// Include the default mannequin drivers
AnyFolder &DefaultMannequinDrivers = .HumanModel.DefaultMannequinDrivers;

// Environment files are used to include objects surrounding human,
// e.g. global reference frame
#include "Model\Environment.any"

AnyFolder ModelEnvironmentConnection =
{
// This file contains all contraints to simulate the standing human
#include "Model/JointsAndDrivers.any"

// Ground reaction force prediction
#include "Model/GRFPrediction.any"
};
};
// Define Study for running kinematics and inverse dynamics simulation analyses
AnyBodyStudy Study =
{
// Include the Model within the Study
AnyFolder &Model = .Model;

§tEnd = 10.0;§
Gravity={0.0, -9.81, 0.0};
nStep = §5§;

//# BEGIN SNIPPET 1
AnyMechOutputFileForceExport §FE_out§ =
{
§FileName = "files_in/clavload.xml";
UseRefFrameOnOff = On;
RefFrame = &Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Clavicula.localrefframe;
AllSegmentsInStudyOnOff = Off;
XMLformatOnOff = On;
Segments = {&Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Clavicula};
MeshRefFrames = {&Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Clavicula.localrefframe};§
};
//# END SNIPPET 1

// Overdeterminate solver is needed while using the
// soft default mannequin drivers.
Kinematics.SolverType = KinSolOverDeterminate;
InitialConditions.SolverType = Kinematics.SolverType ;
//# BEGIN SNIPPET 2
}; // END of Study

§AnyOperationShellExec ConvertToAbq={
Show=On;
FileName = "AnyFE2Abq.exe";
Arguments = "-i .\files_in\clavload.xml -o .\files_out\output.inp -m .\clavicula.inp";
WorkDir=".\ ";
};§
//# END SNIPPET 2

// This is readymade simulation package including some pre-processing steps and the InverseDynamics analysis
#include "Model\RunAppSequence.any"

}; //Main

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#path __BM_PLUGIN_FILE__ "BodyModelConfiguration.any"
#define BM_CONFIG_PLUGIN __BM_PLUGIN_FILE__

// -----------------------------------------------------------------------------------
// The BodyModel configuration can be modified using BodyModel GUI plugin
// or by manually editing this file.
//
// Please see this this file for more information on the options:
// #path HTML_DOC "<AMMR_PATH_DOC>/bm_config/index.html"
// -----------------------------------------------------------------------------------

#define BM_MANNEQUIN_DRIVER_DEFAULT ON

// Enable the TLEM2 lower extremity model
#define BM_LEG_MODEL _LEG_MODEL_TLEM2_

//# BEGIN SNIPPET 1
// Switch off all muscles of the body model
§#define BM_LEG_MUSCLES_BOTH _MUSCLES_NONE_
#define BM_TRUNK_MUSCLES _MUSCLES_NONE_§

// Excluding the left arm segments
§#define BM_ARM_LEFT OFF§
//# END SNIPPET 1
149 changes: 149 additions & 0 deletions Finite_element_analysis/Snippets/Lesson3/Model/DrawSettings.any
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@

DrawSettings ={


//This is the color definitions of the nodes and segments
Colors = {
AnyBodyRed = {149/256,51/256,55/256}; //AnyBody standard red
AnyBodyGreen = {47/256,131/256,80/256}; //AnyBody standard green
AnyBodyBlue = {82/256,85/256,111/256}; //AnyBody standard blue
AnyBodyYellow= {235/256,197/256,17/256}; //AnyBody standard yellow
AnyBodyPaleYellow = {248/256,204/256,115/256}; //AnyBody standard pale yellow
AnyBodyGrey = {153/256,153/256,153/256}; //AnyBody standard grey

Nodes = AnyBodyPaleYellow;
Segments = AnyBodyPaleYellow;
};

Muscle ={
RGB = .Colors.AnyBodyRed;
Visible =On;
DrawScaleOnOff =Off;
Bulging =0.0;
ColorScale =1.0;
RGBColorScale = {0.957031, 0.785156, 0.785156};
MaxStress = 2500000.000000; //N/m^2 //This number is for graphics only!
Opacity =1.0;
DrawScale =
{
EnableCreasing = Off;
CreasingAngle = 0.524;
EnableWireframe = Off;
EnableSmoothing = On;
Param = 0.0;
ParamArray = {0.0, 0.167, 0.333, 0.5, 0.667, 0.833, 1.0};
RGBArray = {{0.0, 0.0, 0.6}, {0.0, 0.0, 1.0}, {0.0, 1.0, 1.0}, {0.0, 1.0, 0.0}, {1.0, 1.0, 0.0}, {1.0, 0.0, 0.0}, {0.6, 0.0, 0.0}};
OpacityArray = {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0};
};
};


BonesOpacity ={

GlobalCoef = 1;

Skull = 1*GlobalCoef;
Thorax = 1*GlobalCoef;
Pelvis = 1*GlobalCoef;
Sacrum = 1*GlobalCoef;
L5 = 1*GlobalCoef;
L4 = 1*GlobalCoef;
L3 = 1*GlobalCoef;
L2 = 1*GlobalCoef;
L1 = 1*GlobalCoef;

RightFoot = 1*GlobalCoef;
RightShank = 1*GlobalCoef;
RightThigh = 1*GlobalCoef;

LeftFoot = 1*GlobalCoef;
LeftShank = 1*GlobalCoef;
LeftThigh = 1*GlobalCoef;


RightClavicula = 1*GlobalCoef;
RightScapula = 1*GlobalCoef;
RightHumerus = 1*GlobalCoef;
RightUlna = 1*GlobalCoef;
RightRadius = 1*GlobalCoef;
RightHand = 1*GlobalCoef;

LeftClavicula = 1*GlobalCoef;
LeftScapula = 1*GlobalCoef;
LeftHumerus = 1*GlobalCoef;
LeftUlna = 1*GlobalCoef;
LeftRadius = 1*GlobalCoef;
LeftHand = 1*GlobalCoef;


// For leg TD only.
RightTalus = 1*GlobalCoef;
RightPatella = 1*GlobalCoef;

LeftTalus = 1*GlobalCoef;
LeftPatella = 1*GlobalCoef;


// For detailed cervical model only.
C1 = 1*GlobalCoef;
C2 = 1*GlobalCoef;
C3 = 1*GlobalCoef;
C4 = 1*GlobalCoef;
C5 = 1*GlobalCoef;
C6 = 1*GlobalCoef;
C7 = 1*GlobalCoef;
};



SegmentAxes ={
RGB ={0,0,1};
ScaleXYZ ={0.0001,0.00001,0.00001};
};
BML ={
ScaleXYZ ={0.0006,0.0006,0.0006};
RGB = .Colors.AnyBodyBlue;
};
JointAxesProximal = {
RGB = .Colors.AnyBodyRed;
ScaleXYZ = {0.015,0.015,0.015};
};
JointAxesDistal = {
RGB = .Colors.AnyBodyGreen;
ScaleXYZ = {0.01,0.01,0.01};
};


SegmentNodes ={
ScaleXYZ ={0.0005,0.0005,0.0005};
RGB = .Colors.AnyBodyRed;
};
WrapGeometry ={
RGB ={1,1,1};
};

DrawSettingsSupport={
Lin={
ScaleFactor=0.004;
RGB = {0,0,1};
Thickness = 0.004;
HeadThickness = 2*Thickness;
HeadLength = 3*Thickness;
};
Rot={
ScaleFactor=0.08;
RGB = {1,0,0};
Thickness = 0.075;
HeadThickness = 2*Thickness;
HeadLength = 5*Thickness;
};
};


Marker={
Color={0,0,1};
Radius=0.00;

};

}; //DrawSettings
Loading