Adams Basic Package > Adams View > View Command Language > part > part modify equation differential_equation

part modify equation differential_equation

Allows you to modify an existing user defined differential equation.

Format:

 
part modify equation differential_equation
differential_equation_name =
an existing equation
new_differential_equation_name =
a new equation
adams_id =
integer
comments =
string
initial_condition =
real
no_initial_condition =
true_only
function =
function
static_hold =
on_off
implicit =
on_off

Example:

 
 
part modify equation differential_equation &
differential_equation_name =
diff__1 &
new_differential_equation_name =
diff__2 &
static_hold =
on &
no_initial_condition =
true

Description:

 
Parameter
Value Type
Description
differential_equation_name
An Existing Equation
Specifies the differential_equation to be modified. You use this parameter to identify the existing differential_equation tobe affected with this command.
new_differential_equation_name
A New Equation
Specifies the name of the new differential_equation. You may use this name later to refer to this differential_equation.
adams_id
Integer
Specifies an integer used to identify this element in the Adams data file.
comments
String
Specifies comments for the object being created or modified.
initial_condition
Real
Specifies the initial value of the user_defined differential variable and, optionally, an approximate value of the initial time derivative.
no_initial_condition
True_Only
Specifies that if an initial condition has been set, to "UNSET" the initial condition for the specified DIFFERENTIAL_EQUATION.
function
Function
Specifies an expression, or defines and passes constants to a user-written subroutine to define the differential equation.
static_hold
On_Off
Indicates that equation states are not permitted to change during static and quasi-static analysis.
implicit
On_Off
Specifies that the FUNCTION expression or the DIFSUB subroutine defines the implicit form of your differential equation.

Extended Definition:

1. A differential equation describes a user-defined variable in terms of its time derivative. The equation may be dependent on any system displacement, velocity, or acceleration; on any applied force; or on any other state variable defined by other differential equations.
Both, Adams FUNCTION expressions and user-written subroutines, can access the user-defined state variables and their derivatives.
FUNCTION expressions access the values by using the function DIF(i1) and the derivatives by using DIF1(i1). In each case, i1 specifies the ADAMS_ID of the differential equation that defines the variable.
User-written subroutines access the values and derivatives by calling the subroutine DEQINF.
You can describe the variable in the differential equation either by writing a FUNCTION expression or by writing a user-written subroutine.
Because it is easier to write FUNCTION expressions than it is to write subroutines, you should use FUNCTION expressions whenever possible to describe user-defined differential variables.
The equation defined by a FUNCTION expression or by a user-written subroutine may be in either explicit or implicit form. The following equation defines the explicit form of a differential equation:
y' = f (y, q, q', t)
In this equation, y' is the derivative of the user-defined state variable, y is the user-defined state variable itself, and q is a vector of Adams-defined state variables. If you cannot solve for the first derivative of the state variable, you need to use the implicit form. The following equation defines the implicit form of a differential equation:
0 = F (y, y', q, q', t)
2. You may identify a differential_equation by typing its name or by picking it from the screen.
Since differential_equation does not have a geometric position, Adams View displays differential_equation icons at or near the model origin. If the differential_equation icon is not visible on the screen, you must type the name. You may also find it convenient to type the name even if the differential_equation icon is displayed.
If you created the differential_equation by reading an Adams data set or graphics file, the differential_equation name is the letters DIF followed by the Adams data set differential_equation ID number. For example, the name of Adams DIFF/101 is DIF101. If you created the differential_equation during preprocessing, you will have given it a name at that time.
If a differential_equation is owned by the default model, you may identify it by entering only its name. If it is not, you must enter its full name. To identify a differential_equation under a different model, for instance, you may need to enter the model name as well.
For example, you may specify differential_equation 'fluid_volume' from model 'hydro' by entering ".hydro.fluid_volume'". If you type a "?", Adams View will list the differential_equation available by default.
You must separate multiple differential_equation names by commas.
If the differential_equation is visible in one of your views, you may identify it by picking on any of the graphics associated with it.
You need not separate multiple differential_equation picks by commas.
3. Normally, entity names are composed of alphabetic, numeric, or '_' (underscore) characters, and start with an alphabetic or '_' character. They may be of any length. For more information, see Using Extended Names.
By enclosing the name in double quotes, you may use other printable characters, or start the name with a numeral. If a name contains characters, or starts with a numeral, you must always quote the name when entering it.
Note that you can specify the parentage of an entity (e.g. what part "owns" a marker or a geometry element) when you CREATE it by changing the name. If you enter just the entity name, then the default parent will be assigned by Adams View. If you type in the full name, then you may override the default parent. In most cases, when creating an entity, Adams View will provide a default name. The default name that Adams View provides will specify the parentage that it has assumed.
You may, of course, delete this name and use your own. The form of a full name is:
"...._NAME.GRAND_PARENT_NAME.PARENT_NAME.ENTITY_NAME"
The number of levels used varies from case to case and the parentage must exist before an entity can be assigned to it.
4. When you use the FILE ADAMS_DATA_SET WRITE command, Adams View writes an Adams data file for your model. Adams requires that each modeling element be identified by a unique integer identifier. If you use this parameter to specify a non-zero identifier, Adams View will use it in the corresponding statement in the Adams data file.
You may also enter zero as an identifier, either explicitly or by default. The next time you write an Adams file, Adams View will replace the zero with a unique, internally-generated identifier.
Adams View will permanently store this identifier with the element just as if you had entered it yourself.
Normally, you would let all identifiers default to zero, and Adams View would generate the identifiers for you. You are never required to enter a non-zero identifier. You only need to specify it if, for some reason, you wish to control the Adams file output.
5. When an Adams Solver data file (.adm) is read into Adams View, all comments associated with a statement (from the end of the previous statement through the end of the current statement) are stored with the object. Comments in the data file can be associated with model.
These comments must follow the title statement and be followed by the comment 'END OF MODEL COMMENTS'. This string must be uppercase.
When an Adams Solver data file is written, the comments for an object are written before the statement corresponding to the object.
6. The first value of the initial_condition parameter is the value of the user- defined variable at the start of the simulation. If you have entered an implicit equation, the second value may also need to be specified, which is an approximate value of the time derivative of the user-defined variable at the start of the simulation. Adams may adjust the value of the time derivative when it performs an initial conditions analysis. Entering an initial value for the time derivative may help Adams converge to an initial conditions solution. If you enter an explicit equation, you do not need to supply the second value since Adams can compute the initial time derivative directly from the equation.
7. Setting the no_initial_condition parameter is not the same as setting the value to zero. A zero initial condition is not the same as "no" initial condition. Therefore, when this parameter is set to true, there is no longer an initial condition for this element.
8. Adams View treats this parameter as a series of literal strings. When you write an Adams data set, Adams View writes these strings, just as you enter them here, after the 'FUNCTION=' argument.
If you want to define the equation with an expression, enclose the expression in quotes and enter it just as you would in the data set.
See the Adams User's Manual for information on writing function expressions. If your expression is longer than 65 characters, you should break it up into separate strings so it does not extend past the Adams 80-character line-length limit. Adams View will write each string on a separate line in the data set.
If you want to define the equation with a user-written subroutine, enter the character string "USER(r1[,...,r30])", where r1[,...,r30]
are the values you want Adams to pass to your user-written subroutine DIFSUB. If you enter "USER(1.,2.,3.)", for instance, Adams will call your DIFSUB with values 1, 2, and 3. See the Adams User's Manual for more information on using DIFSUBs.
9. The user specified initial conditions are retained as the static equilibrium values. Note that this does not guarantee that the time derivatives of the user-defined variable will be zero after static analysis.
10.  In this case, Adams will set the derivative of the state variable to a value that makes the value of FUNCTION zero. If you do not specify IMPLICIT, Adams assumes that either the expression or the user-written subroutine defines the explicit form of the equation. In this case, the time derivative of the state variable is set to the value of FUNCTION.

Cautions:

1. Adams View will not allow you to have two differential_equations with the same name, so you must provide a unique name.