# USER_EQUATION_INITIAL_CONDITION

Specifies the initial user equation values for a particle set and a single user equation.

## Type

AcuTrace Command

## Syntax

USER_EQUATION_INITIAL_CONDITION ("name") {parameters...}

## Qualifier

User-given name.

## Parameters

- particle_seed or seed (string) [no default]
- The name of the particle set. Must be a qualifier used in one of the PARTICLE_SEED commands.
- user_equation (string) [no default]
- The name of the user equation. Must be a qualifier used in one of the USER_EQUATION commands.
- type (enumerated) [=constant]
- The type of initial condition specification.
- constant
- Assign the same initial condition to all seeds.
- per_seed
- Use a list of initial conditions.
- random
- Randomly assign initial condition.

- constant_values (array) [no default]
- User equation initial condition assigned to all seeds. The size of the array must equal the number of variables in the user equation. Use only if type is constant.
- seed_values (array) [no default]
- List of initial condition vectors, one per seed. The number of columns in each row must the number of variables in the user equation. The number of rows must equal the number of seeds in the seed group. Use only if type is per_seed.
- random_bounds (array) [no default]
- Upper and lower bounds used to assign the random initial conditions. The array should have two rows, one for each bound. The number of columns in each row equal must the number of variables in the user equation. Use only if type is random.

## Description

```
EQUATION {
...
user_equations = {user1, user2}
}
PARTICLE_SEED( "seed1" ) {
...
}
PARTICLE_SEED( "seed2" ) {
...
}
PARTICLE_SEED( "seed3" ) {
...
}
```

```
USER_EQUATION_INITIAL_CONDITION( "seed1_user1" ) {
particle_seed = "seed1"
user_equation = "user1"
...
}
USER_EQUATION_INITIAL_CONDITION( "seed1_user2" ) {
particle_seed = "seed1"
user_equation = "user2"
...
}
USER_EQUATION_INITIAL_CONDITION( "seed2_user1" ) {
particle_seed = "seed2"
user_equation = "user1"
...
}
USER_EQUATION_INITIAL_CONDITION( "seed2_user2" ) {
particle_seed = "seed2"
user_equation = "user2"
...
}
USER_EQUATION_INITIAL_CONDITION( "seed3_user1" ) {
particle_seed = "seed3"
user_equation = "user1"
...
}
USER_EQUATION_INITIAL_CONDITION( "seed3_user2" ) {
particle_seed = "seed3"
user_equation = "user2"
...
}
```

The user given names, seed1_user1, and so on, do not need to follow the convention used in this example, as long as each seed set and user equation pairing is assigned a unique name.

- a constant over the seed set, for
example,
`USER_EQUATION_INITIAL_CONDITION( "seed1_user1" ) { particle_seed = "seed1" user_equation = "user1" type = constant constant_values = { 1.0, 2.0, 3.0, 4.0 } }`

- per seed, for
example,
`USER_EQUATION_INITIAL_CONDITION( "seed1_user1" ) { particle_seed = "seed1" user_equation = "user1" type = per_seed constant_values = { 1.0, 2.0, 3.0, 4.0 ; 1.1, 2.3, 2.9, 3.7 ; 1.2, 2.4, 3.1, 4.2 } }`

- randomly, for
example,
`USER_EQUATION_INITIAL_CONDITION( "seed1_user1" ) { particle_seed = "seed1" user_equation = "user1" type = random random_bounds = { 1.0, 1.9, 2.8, 3.5 ; 2.0, 3.5, 4.1, 4.7 } }`

When type equals per_seed, the number of initial value vectors, three in the example shown, must equal the number of seeds in the seed set. When type equals random, each component of each user equation value is randomly assigned a value between the corresponding bounds. Here, the first components all lie between 1.0 and 2.0, the second between 1.9 and 3.5, and so on.

```
EQUATION {
...
user_equations = {user1}
}
PARTICLE_SEED( "seed1" ) {
...
}
USER_EQUATION( "user1" ) {
...
}
USER_EQUATION( "user2" ) {
...
}
```

```
USER_EQUATION_INITIAL_CONDITION( "seed1_user2" ) {
particle_seed = "seed1"
user_equation = "user2"
...
}
```

allowed but not required. In fact, since user2 is not listed by the user_equations parameter, the command USER_EQUATION_INITIAL_CONDITION("seed1_user2") command has no effect.

```
USER_EQUATION_INITIAL_CONDITION( "seed1_user2_a" ) {
particle_seed = "seed1"
user_equation = "user2"
...
}
USER_EQUATION_INITIAL_CONDITION( "seed1_user2_b" ) {
particle_seed = "seed1"
user_equation = "user2"
...
}
```