Main function for solving inital condition boundary condition problem PDE in variables
t and x with a PINN (physics informed neural network).
| Parameters: |
-
eqn
(string)
–
Equation to solve in form of string. Function and derivatives represented as "u", "ut", "ux", "utt", "uxx",
etc. for including function, i.e. cos(u), use tf.cos(u), or for ln(t), np.log(t). Write equation as would be written in code.
Must be eqn = 0. Rearrange equation to equal 0.
-
setup_initials
(initial)
–
initial conditions set up from return of pde_Initials.setup_initialconds_2var call.
See examples or API for initials for how to use.
-
setup_boundaries
(boundary)
–
boundary conditions set up from return of pde_Boundaries_2var call.
See examples or API for boundaries for how to use.
-
N_pde
(int, default:
10000
)
–
Number of randomly sampled collocation points along t and x which PINN uses in training.
-
net_layers
(int, default:
4
)
–
Number of internal layers of PINN
-
net_units
(int, default:
60
)
–
Number of units in each internal layer
-
constraint
(string, default:
'soft'
)
–
Determines hard constrainting inital conditions or network learning inital conditions. "soft" or "hard"
-
model
(PINN, default:
None
)
–
User may pass in user constructed network, however no guarentee of correct training.
-
extra_ders
(list, default:
None
)
–
List of extra derivatives needed to be used. Network only computes single variable derivatives
by default ("utt", "uxxx", etc). If derivative not definded then input as string in list. Ex, if using
"utx" and "utxt", then set extra_ders = ["utx", "utxt]
|
| Returns: |
-
solutionObj( pde_tx_solution
) –
pde_tx_solution class containing all information from training
|