Skip to content

How to adopt adaptive mesh refinement in marbles #124

@guzmin16

Description

@guzmin16

Now I am trying to refine the zone when vel_mag>0.07, refer to the documentation for the GNU Make scheme and write the input file as follow:

#maximum number of time steps at base AMR level
max_step = 1000

#coordinates of domain's lower corner
geometry.prob_lo = 0.0 0.0 0.0

#coordinates of domain's upper corner
geometry.prob_hi = 96.0 16.0 16.0

#flag for periodicity (here y direction is periodic)
geometry.is_periodic = 0 1 1

#number of cells along each direction at base level
amr.n_cell = 96 16 16

#maximum level number allowed
amr.max_level = 2

#maximum number of cells per box along x,y,z
amr.max_grid_size = 16

#number of timesteps between plot files
amr.plot_int = 100

#number of timesteps between checkpoint files
amr.chk_int = 1000

#LBM parameteris
lbm.bc_lo = 2 0 0
lbm.bc_hi = 3 0 0
lbm.dx_outer = 0.5
lbm.dt_outer = 0.5
lbm.nu = 0.01733333333333333
lbm.save_streaming = 0

lbm.velocity_bc_type = "channel"
velocity_bc_channel.u_ref = 0.1

lbm.ic_type = "constant"
ic_constant.density = 1.0
ic_constant.velocity = 0.0 0.0 0.0

#embedded boundary
eb2.geom_type = "cylinder"
eb2.cylinder_radius = 2.0
eb2.cylinder_center = 32.0 8.0 8.0
eb2.cylinder_has_fluid_inside = 0
eb2.cylinder_height = 256.0
eb2.cylinder_direction = 1

#amrex options for trapping FPEs
amrex.fpe_trap_invalid = 1
amrex.fpe_trap_zero = 1
amrex.fpe_trap_overflow = 1

#tag with a velocity magnitude value
tagging.refinement_indicators = vel_mag

tagging.vel_mag.max_level = 2
tagging.vel_mag.value_greater = 0.07
tagging.vel_mag.field_name = vel_mag

But a error message is reported:Erroneous arithmetic operation, I wonder whether marbles could adopt AMR tech.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions