PCL and Customization > Accessing the Patran Database > Load Cases
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Load Cases
The analysis application may allow the user to select the load cases of interest from an Analysis form, employ only the current load case, or use all load cases in the database. If the user is allowed to select the load cases of interest, the names of the selected load cases can be passed to the end application as an argument, through a temporary text file of by storing the load case names as job parameters.
Exportation of Load Case Definitions
In order to get the name of the currently active load case, use the following function.
.  
db_get_active_load_case
( <load_case_name> )
 
Output:
 
 
CHARACTER STRING
 
 
<load_case_name>
The name of the currently active load case.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Notes:
The C name differs. It is DbFGetActiveLoadCase.
int DbFGetActiveLoadCase ( load_case_name )
 char 	*load_case_name
In order to get the names of all the load cases stored in the database, use the following “get all - get next” set of functions. First call the “get all” function and then call the “get next” function until it returns to non-zero status, meaning that no more load cases exist. The non-zero status call does not return a valid load case. In other words, if a non-zero status is returned on the fifth “get next” call, then four load cases existed in the database.
 
db_get_all_load_case_names
( )
  
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Notes:
The C name differs. It is DbFGetAllLoadCaseNames.
 
db_get_next_load_case_name
( <load_case_name> )
 
Output:
 
 
STRING
<load_case_name>
The name of a load case stored in the database. The maximum length of a load case name is 80 characters.
INTEGER
<Return Value>
If zero, the function is returning a valid load case name. If non-zero, there are no more load case names to return. This function should be called until a non_zero status is returned.
Notes:
The C name differs. It is DbFGetNextLoadCaseName.
int DbFGetNextLoadCaseName ( load_case_name )
char	*load_case_name
 
db_count_lbc_by_load_case
( <load_case_name>, <num_loads> )
 
Input:
 
 
CHARACTER STRING
 
 
<load_case_name>
The name of the load case of interest.
Output:
 
 
INTEGER
<num_loads>
The number of loads associated with this load case.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Notes:
The C name differs. It is DbFCountLBCByLoadCase.
int DbFCountLBCByLoadCase ( load_case_name, num_loads )
 char 	*load_case_name
 int 	*num_loads
To get the IDs for all the loads associated with a load case and other load case information, the following function is used.
 
db_get_load_case
( <load_case_name>, <load_case_id>, <load_case_type>, <load_case_description>, <num_loads>, <load_ids>, <dynamic_case_name>, <evaluation_point>, <load_priorities> )
 
Input:
 
 
CHARACTER STRING
 
 
<load_case_name>
The name of the load case of interest.
Output:
 
 
INTEGER
<load_case_id>
The internal ID of the specified load case.
INTEGER
<load_case_type>
A flag specifying the type of load case:
1 = static load case
2 = time dependent load case
3 = frequency dependent load case
CHARACTER STRING
 
 
<load_case_description>
A character string containing a description of the specified
load case.
INTEGER
<num_loads>
The number of loads associated with this load case.
INTEGER ARRAY
 
<load_ids>
The <num_loads> IDS of all the loads associated with this load case.
CHARACTER STRING
 
 
<dynamic_case_name>
The name o fthe dynamic load case from which this static load case was derived. A blank string if not applicable.
REAL
<evaluation_point>
The time or frequency value at which the dynamic load case was evaluated in order to create this static load case. Zero if not applicable.
INTEGER ARRAY
 
 
<load_priorities>
<num_loads> flags associated with all the loads in this load case specifying the priority of the load over other loads:
0 = no priority. The corresponding load will be overwritten by any load with priority whenever there is a conflict (multiple loads on the same node, for example). If all loads have “no priority” then the values from all the loads are simply combined.
1 = highest priority. This load will overwrite all other loads whenever a conflict occurs. Only one load should have priority 1 in a given load case.
2 = second highest priority. When a conflict occurs, this load will overwrite all other loads except for the load with priority 1. Only one load should have priority 2 in a given load case..
etc.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
INTEGER
<load_case_type>
A flag specifying the type of load case:
1 = static load case
2 = time dependent load case
3 = frequency dependent load case
Notes:
The C name differs. It is DbFGetLoadCase.
int DbFGetLoadCase ( load_case_name, load_case_id, load_case_type, load_case_description,
 	num_loads, load_ids, dynamic_case_name, evaluation_point,
	 load_priorities )
 char 	*load_case_name
 int 	*load_case_id
 int 	*load_case_type
 char 	*load_case_description
 int 	*num_loads
 int 	load_ids[ ]
 char 	*dynamic_case_name
 float 	*evaluation_point
 int	load_priorities[]
 
db_get_load_case2
( <load_case_name>, <load_case_id>, <load_case_scale_factor>, <load_case_type>, <load_case_description>, <num_loads>, <load_ids>, <load_scale_factors>, <load_priorities>, <dynamic_case_name>, <evaluation_point> )
 
Input:
 
 
CHARACTER STRING
 
 
<load_case_name>
The name of the load case of interest.
Output:
 
 
INTEGER
<load_case_id>
The internal ID of the specified load case.
REAL
<load_case_scale_factor>
 
 
The factor by which all loads in this load case will be scaled.
INTEGER
<load_case_type>
A flag specifying the type of load case:
1 = static load case
2 = time dependent load case
3 = frequency dependent load case
CHARACTER STRING
 
 
<load_case_description>
 
 
A character string containing a description of the specified
load case.
INTEGER
<num_loads>
The number of loads associated with this load case.
INTEGER ARRAY
 
<load_ids>
The <num_loads> IDS of all the loads associated with this load case.
REAL ARRAY
 
 
<load_scale_factors>
An array of <num_loads> scale factors corresponding to the <load_ids> by which each load is to be scaled.
INTEGER ARRAY
 
 
<load_priorities>
<num_loads> flags associated with all the loads in this load case specifying the priority of the load over other loads:
0 = no priority. The corresponding load will be overwritten by any load with priority whenever there is a conflict (multiple loads on the same node, for example). If all loads have “no priority” then the values from all the loads are simply combined.
1 = highest priority. This load will overwrite all other loads whenever a conflict occurs. Only one load should have priority 1 in a given load case.
2 = second highest priority. When a conflict occurs, this load will overwrite all other loads except for the load with priority 1. Only one load should have priority 2 in a given load case.etc.
CHARACTER STRING
 
 
<dynamic_case_name>
 
 
The name o fthe dynamic load case from which this static load case was derived. A blank string if not applicable.
REAL
<evaluation_point>
The time or frequency value at which the dynamic load case was evaluated in order to create this static load case. Zero if not applicable.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Importation of Load Case Definitions
The function “db_create_load_case” should be used to add load case definitions to a Patran database.
 
db_create_load_case
( <load_case_name>, <load_case_type>, <load_case_description>, <num_loads>, <load_ids>, <dynamic_case_name>, <evaluation_point>, <load_priorities>, <load_case_id> )
 
Input:
 
 
CHARACTER STRING
 
 
<load_case_name>
The external name of this load case.
INTEGER
<load_case_type>
A flag specifying the type of load case:
1 = static load case
2 = time dependent load case
3 = frequency dependent load case
CHARACTER STRING
 
 
<load_case_description>
 
 
A character string containing a description of this load case.
INTEGER
<num_loads>
The number of loads associated with this load case.
INTEGER ARRAY
 
 
<load_ids>
The <num_loads> IDs of all the loads associated with this load case.
CHARACTER STRING
 
 
<dynamic_case_name>
 
 
The name of the dynamic load case from which this static load
case was derived. A blank string if not applicable.
REAL
<evaluation_point>
The time or frequency value at which the dynamic load case was evaluated in order to create this static load case. Zero if not applicable.
INTEGER ARRAY
 
 
<load_priorities>
<num_loads> flags associated with all the loads in this load case specifying the priority of the load over other loads:
0 = no priority. The corresponding load will be overwritten by any load with priority whenever there is a conflict (multiple loads on the same node, for example). If all loads have “no priority” then the values from all the loads are simply combined.
1 = highest priority. This load will overwrite all other loads whenever a conflict occurs. Only one load should have priority 1 in a given load case.
2 = second highest priority. When a conflict occurs, this load will overwrite all other loads except for the load with priority 1. Only one load should have priority 2 in a given load case.
3 = third highest priority, etc.
 
Output:
 
 
INTEGER
<load_case_id>
The internal ID assigned to this load case by Patran.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Notes:
The C prototype for this function is:
      int DbFCreateLoadCase
         (
         char	 *  load_case_name,
         int	 load_case_type,
         char	 *  load_case_description,
         int	 number_loads,
         int	 *  load_ids,
         char	 *  dynamic_case_name,
         double	 evaluation_point,
         int	 *  load_priorities,
         int	 *  load_case_id
         );