wiki:BoundaryOptions

Version 5 (modified by Jonathan, 11 years ago) ( diff )

Extrapolating Boundary Conditions (mthbc = 1)

  • Extrapolating boundary conditions are in general unphysical - and should only technically be used when it can be guaranteed that the flow will always be leaving the grid supersonically. However it is often ok as long as the flow is not entering the grid. If material enters the grid at an interpolating boundary condition - then information is traveling both upstream and downstream and a type of feedback is possible which can result in run-away growth… Problems with gravitational sources are particularly susceptible to extrapolating boundary conditions and if extrapolating boundary conditions are used - there should be checks to ensure that there is never any inflow at an extrapolated boundary condition.

Periodic Boundaries (mthbc = 2)

  • Periodic boundaries are probably the most physically friendly - in that there is no boundary to worry about things happening at. Most objects are aware of periodic boundaries so for instance if you have a periodic cube and place a clump in one corner - the clump module will correctly place octants of that clump in each of the 8 corners. And of course if you are using your own initial conditions - make sure they are periodic as well.

Reflecting Boundary Conditions

  • All of the reflecting boundary conditions reflect the values inside the grid into the ghost zones. However some components also change sign depending on the particular boundary conditions.

Reflecting Wall (mthbc = 3)

  • A reflecting wall boundary will change the sign of the velocity component normal to the wall - as well as the magnetic field component normal to the wall. This ensures there is no mass flux across the boundary and prevents fields lines from crossing the boundary. Besides being useful for superconducting walls - often the symmetry of the problem will allow you to save on computational cost by modeling only half of the domain. Be careful - however - as real instabilities that might occur and break the symmetry - will be suppressed!

Reflecting B Parallel (mthbc = 4)

  • Just like the reflecting wall, the normal component of the velocity changes sign. However instead of changing the sign of the normal component of the magnetic field - here the parallel components change sign. This keeps field lines normal to the boundary.

Reflect Cylindrical (mthbc = 5)

  • This is similar to Reflect wall - but in addition the 'z' component of the velocity and magnetic fields also change sign. This should be used for the boundary at x=0 when using axisymmetric geometry (iCylindrical > 0). This is due to the fact that as you cross the z-axis the direction of the radial and azimuthal unit vectors are inverted. For axisymmetric simulations whose domain goes from r=[0..R] and z=[0..Z], common boundary conditions are 5 3 1 1 1 1 or 5 4 1 1 1 1 depending on whether the field lines are parallel to z=0 plane or perpendicular. Poloidal configurations would use the first option and Toroidal configurations would use the second. For combinations of Poloidal and toroidal fields, you no longer have reflected symmetry in 'z' so you must simulate the entire extent in z (z=-Z..Z).

User Specified Boundaries

  • When there are jets or winds - it is in general better to explicitly set the ghost zones rather than relying on extrapolating boundaries to maintain an initial wind or jet profile. With magnetic fields you cannot just set aux fields without introducing divergence - however as long as you only step on the aux fields in the ghost regions and don't modify any of the aux zones that are internal to the grid ie.
    aux(1:mx+1, 1:my, 1:mz, 1), aux(1:mx, 1:my+1,1:mz,2), aux(1:mx, 1:my, 1:mz+1,3)
    
    it should not create problems
  • Alternatively you could use reflective boundary conditions for the field to keep the field lines normal (4) or parallel (3) to the boundary and only step on the fluid variables (density, momentum, energy)…
Note: See TracWiki for help on using the wiki.