FEDEM Solver  R8.0
Source code of the dynamics solver
Data Types | Functions/Subroutines | Variables
masterslavejointtypemodule Module Reference

Module with data types representing joint objects. More...

Data Types

type  jmtriadtype
 Data type representing a master triad in a joint. More...
 
type  slavedoftype
 Data type representing a slave DOF in a joint. More...
 
type  jointdoftype
 Data type representing a joint DOF. More...
 
type  slidertype
 Data type representing slide DOF in a multi-master joint. More...
 
type  masterslavejointtype
 Data type representing a master-slave-based joint. More...
 
type  higherpairtype
 Data type representing a higher pairs object. More...
 
interface  getptrtoid
 Returns pointer to object with specified ID. More...
 
interface  getptrtoowner
 Returns pointer to owner of specified object. More...
 
interface  writeobject
 Standard routine for writing an object to file. More...
 
interface  deallocatejoints
 Deallocates an array of objects. More...
 
interface  updateatconvergence
 Updates the state variables pertaining to previous time step. More...
 
interface  restorefromlaststep
 Restores the state variables from the last converged time step. More...
 

Functions/Subroutines

type(masterslavejointtype) function, pointer, private getptrtoidjoint (array, id, index, jointType)
 Return pointer to (first) joint with specified id. More...
 
type(masterslavejointtype) function, pointer, private getptrtojointwithspring (array, spring)
 Returns pointer to joint connected to given spring. More...
 
type(masterslavejointtype) function, pointer, private getptrtojointwithdamper (array, damper)
 Return pointer to joint connected to given damper. More...
 
subroutine, private writejoint (joint, io, complexity)
 Standard routine for writing an object to file. More...
 
subroutine nullifyjoint (joint)
 Initializes a joint object. More...
 
subroutine nullifyjointdof (jointDof)
 Initializes a joint DOF object. More...
 
subroutine deallocatejoint (joint)
 Deallocates a joint object. More...
 
subroutine deallocatemasterslavejoints (joints)
 Deallocates an array of joint objects. More...
 
subroutine deallocatehigherpairs (higherPairs)
 Deallocates an array of higher pairs objects. More...
 
subroutine setjointsvelacc (joints, velGlobal, accGlobal)
 Sets velocity/acceleration for all joint DOFs from system vectors. More...
 
subroutine getjointsvelacc (joints, velGlobal, accGlobal)
 Fills system velocity/acceleration vectors with joint DOF values. More...
 
real(dp) function getjointvar (joint, dofInd, type)
 Returns the current value of a joint variable. More...
 
character(len=15+lid_p) function getjointid (joint)
 Returns the full id (type name, user id and description) of a joint. More...
 
recursive integer function getnumberofmasterdofs (joint)
 Returns the total number of independent DOFs of a joint. More...
 
recursive logical function haszerovelacc (joint)
 Checks if all joint DOFs have zero velocities and accelerations. More...
 
real(dp) function, dimension(6) transvslavetojoint (joint, u)
 Transforms a vector to the joint DOF directions. More...
 
subroutine, private updatepreviousjointvalues (joint)
 Updates the state variables pertaining to the previous time step. More...
 
subroutine, private restorepreviousjointvalues (joint)
 Restores the state variables from the last converged time step. More...
 

Variables

character(len=15), dimension(3), parameter rotparamtypes_p = (/ 'FOLLOWER_AXIS ', 'ORTHOGONAL_AXIS', 'ROT_AXIS ' /)
 Rotation formulation names. More...
 
character(len=15), dimension(8), parameter jointtypename_p = (/ 'Revolute joint ', 'Ball joint ', 'Rigid joint ', 'Free joint ', 'Prismatic joint', 'Cylindric joint', 'Cam joint ', 'Axial joint ' /)
 Joint type names. More...
 

Detailed Description

Module with data types representing joint objects.

The module also contains subroutines for accessing the joint data.

Function/Subroutine Documentation

◆ deallocatehigherpairs()

subroutine masterslavejointtypemodule::deallocatehigherpairs ( type(higherpairtype), dimension(:), pointer  higherPairs)

Deallocates an array of higher pairs objects.

Parameters
higherPairsThe masterslavejointtypemodule::higherpairttype objects to deallocate
Author
Knut Morten Okstad
Date
23 Jan 2017

◆ deallocatejoint()

subroutine masterslavejointtypemodule::deallocatejoint ( type(masterslavejointtype), intent(inout)  joint)

Deallocates a joint object.

Parameters
jointThe masterslavejointtypemodule::masterslavejointtype object to deallocate
Author
Knut Morten Okstad
Date
23 Jan 2017

◆ deallocatemasterslavejoints()

subroutine masterslavejointtypemodule::deallocatemasterslavejoints ( type(masterslavejointtype), dimension(:), pointer  joints)

Deallocates an array of joint objects.

Parameters
jointsThe masterslavejointtypemodule::masterslavejointtype objects to deallocate
Author
Knut Morten Okstad
Date
23 Jan 2017

◆ getjointid()

character(len=15+lid_p) function masterslavejointtypemodule::getjointid ( type(masterslavejointtype), intent(in)  joint)

Returns the full id (type name, user id and description) of a joint.

Parameters
[in]jointThe joint to get the id for
Author
Knut Morten Okstad
Date
27 Oct 2005
Here is the caller graph for this function:

◆ getjointsvelacc()

subroutine masterslavejointtypemodule::getjointsvelacc ( type(masterslavejointtype), dimension(:), intent(in)  joints,
real(dp), dimension(:), intent(out)  velGlobal,
real(dp), dimension(:), intent(out)  accGlobal 
)

Fills system velocity/acceleration vectors with joint DOF values.

Parameters
[in]jointsAll joints in the model
[out]velGlobalGlobal velocity vector
[out]accGlobalGlobal acceleration vector
Author
Knut Morten Okstad
Date
18 Oct 2002
Here is the caller graph for this function:

◆ getjointvar()

real(dp) function masterslavejointtypemodule::getjointvar ( type(masterslavejointtype), intent(in)  joint,
integer, intent(in)  dofInd,
integer, intent(in)  type 
)

Returns the current value of a joint variable.

Parameters
[in]jointThe joint to get the id for
[in]dofIndJoint dof index
[in]typeType of the variable to return value for (1: displacement, 2: velocity, 3: acceleratuion)
Author
Knut Morten Okstad
Date
8 Apr 2005
Here is the caller graph for this function:

◆ getnumberofmasterdofs()

recursive integer function masterslavejointtypemodule::getnumberofmasterdofs ( type(masterslavejointtype), intent(in)  joint)

Returns the total number of independent DOFs of a joint.

Parameters
[in]jointThe joint to get number of independent DOFs for

This is a recursive function that works only after the joint chaining has been resolved.

Author
Knut Morten Okstad
Date
1 Nov 2005
Here is the caller graph for this function:

◆ getptrtoidjoint()

type(masterslavejointtype) function, pointer, private masterslavejointtypemodule::getptrtoidjoint ( type(masterslavejointtype), dimension(:), intent(in), target  array,
integer, intent(in)  id,
integer, intent(out), optional  index,
integer, intent(in), optional  jointType 
)
private

Return pointer to (first) joint with specified id.

Parameters
[in]arrayArray of masterslavejointtypemodule::masterslavejointtype objects to search within
[in]idBase ID of the object to search for
[out]indexThe array index of the found object
[in]jointTypeSpecified joint type to search for

If the joint is not found, NULL is returned. Optionally, the userID for a specified jointType is searched for (default is to search for baseID and any joint type).

Author
Bjorn Haugen / Knut Morten Okstad
Date
17 Dec 2009

◆ getptrtojointwithdamper()

type(masterslavejointtype) function, pointer, private masterslavejointtypemodule::getptrtojointwithdamper ( type(masterslavejointtype), dimension(:), intent(in), target  array,
type(damperbasetype), intent(in), target  damper 
)
private

Return pointer to joint connected to given damper.

Parameters
[in]arrayArray of masterslavejointtypemodule::masterslavejointtype objects to search within
[in]damperThe damper base object to search for within the joints

If no joint has the given damper, NULL is returned.

Author
Knut Morten Okstad
Date
1 Jul 2002

◆ getptrtojointwithspring()

type(masterslavejointtype) function, pointer, private masterslavejointtypemodule::getptrtojointwithspring ( type(masterslavejointtype), dimension(:), intent(in), target  array,
type(springbasetype), intent(in), target  spring 
)
private

Returns pointer to joint connected to given spring.

Parameters
[in]arrayArray of masterslavejointtypemodule::masterslavejointtype objects to search within
[in]springThe spring base object to search for within the joints

If no joint has the given spring, NULL is returned.

Author
Knut Morten Okstad
Date
1 Jul 2002

◆ haszerovelacc()

recursive logical function masterslavejointtypemodule::haszerovelacc ( type(masterslavejointtype), intent(in)  joint)

Checks if all joint DOFs have zero velocities and accelerations.

Parameters
[in]jointThe joint to check for velocity/accelerations
Returns
.true. if all joint DOFs have zero velocity and acceleration, otherwise .false.

The function recursively checks all master- and slave DOFs in the joint and returns as soon a non-zero velocity or acceleration is found. The function works only after the joint chaining has been resolved.

Author
Knut Morten Okstad
Date
7 Nov 2005
Here is the caller graph for this function:

◆ nullifyjoint()

subroutine masterslavejointtypemodule::nullifyjoint ( type(masterslavejointtype), intent(out)  joint)

Initializes a joint object.

Parameters
[out]jointThe masterslavejointtypemodule::masterslavejointtype object to initialize
Author
Knut Morten Okstad
Date
24 Jun 2002

◆ nullifyjointdof()

subroutine masterslavejointtypemodule::nullifyjointdof ( type(jointdoftype), intent(out)  jointDof)

Initializes a joint DOF object.

Parameters
[out]jointDofThe masterslavejointtypemodule::jointdoftype object to initialize
Author
Knut Morten Okstad
Date
4 Oct 2005

◆ restorepreviousjointvalues()

subroutine, private masterslavejointtypemodule::restorepreviousjointvalues ( type(masterslavejointtype), intent(inout)  joint)
private

Restores the state variables from the last converged time step.

Parameters
jointThe joint to restore the state variables for

This subroutine is invoked when doing iteration cut-back.

Author
Knut Morten Okstad
Date
2 Nov 2008

◆ setjointsvelacc()

subroutine masterslavejointtypemodule::setjointsvelacc ( type(masterslavejointtype), dimension(:), intent(inout)  joints,
real(dp), dimension(:), intent(in)  velGlobal,
real(dp), dimension(:), intent(in)  accGlobal 
)

Sets velocity/acceleration for all joint DOFs from system vectors.

Parameters
jointsAll joints in the model
[in]velGlobalGlobal velocity vector
[in]accGlobalGlobal acceleration vector
Author
Knut Morten Okstad
Date
20 Jun 2002
Here is the caller graph for this function:

◆ transvslavetojoint()

real(dp) function, dimension(6) masterslavejointtypemodule::transvslavetojoint ( type(masterslavejointtype), intent(in)  joint,
real(dp), dimension(:), intent(in)  u 
)

Transforms a vector to the joint DOF directions.

Parameters
[in]jointThe joint to perform the transformation for
[in]uThe vector to be transformed
Returns
The transformed vector

The vector u is transformed from the global directions in slave triad to the joint directions, accounting for possible eccentricity between the joint position and the slave triad position.

Author
Knut Morten Okstad
Date
23 May 2008
Here is the caller graph for this function:

◆ updatepreviousjointvalues()

subroutine, private masterslavejointtypemodule::updatepreviousjointvalues ( type(masterslavejointtype), intent(inout)  joint)
private

Updates the state variables pertaining to the previous time step.

Parameters
jointThe joint to update the state variables for

This subroutine is invoked once for each joint after convergence has been achieved.

Author
Knut Morten Okstad
Date
28 Oct 2008

◆ writejoint()

subroutine, private masterslavejointtypemodule::writejoint ( type(masterslavejointtype), intent(in)  joint,
integer, intent(in)  io,
integer, intent(in), optional  complexity 
)
private

Standard routine for writing an object to file.

Parameters
[in]jointThe masterslavejointtypemodule::masterslavejointtype object to write
[in]ioFile unit number to write to
[in]complexityIf present, the value indicates the amount of print
Author
Karl Erik Thoresen
Date
27 Sep 1998

Variable Documentation

◆ jointtypename_p

character(len=15), dimension(8), parameter masterslavejointtypemodule::jointtypename_p = (/ 'Revolute joint ', 'Ball joint ', 'Rigid joint ', 'Free joint ', 'Prismatic joint', 'Cylindric joint', 'Cam joint ', 'Axial joint ' /)

Joint type names.

◆ rotparamtypes_p

character(len=15), dimension(3), parameter masterslavejointtypemodule::rotparamtypes_p = (/ 'FOLLOWER_AXIS ', 'ORTHOGONAL_AXIS', 'ROT_AXIS ' /)

Rotation formulation names.