Large number of @variables in ModelingToolkit

https://neuralpde.sciml.ai/stable/pinn/system/

When I need several variables I can write
@parameters t, x
@variables u1(…), u2(…), u3(…)

and in solver use
@named pde_system = PDESystem(eqs,bcs,domains,[t,x],[u1(t, x),u2(t, x),u3(t, x)])

What is the right way to generalize this for a large number of variables? I would like to do something like
@variables u[1:n] (…)
@named pde_system = PDESystem(eqs,bcs,domains,[t,x],u(t, x))

and then I could use u[1] instead of u1 etc, but that doesn’t work.

That sems like a parsing issue. Open an issue in Symbolics. It looks like just the direct call form @variables t x u[1:5](t,x) is handled.