In a numerical simulation, it is impossible and unnecessary to simulate the whole universe. Generally we choose a region of interest in which we conduct a simulation. The interesting region has a certain boundary with the surrounding environment. Numerical simulations also have to consider the physical processes in the boundary region. In most cases, the boundary conditions are very important for the simulation region's physical processes. Different boundary conditions may cause quite different simulation results. Improper sets of boundary conditions may introduce nonphysical influences on the simulation system, while a proper set of boundary conditions can avoid that. So arranging the boundary conditions for different problems becomes very important. While at the same time, different variables in the environment may have different boundary conditions according to certain physical problems.
Commonly there are several different types of boundary conditions: