include("../../tug/Simulation.jl") function main() # **** GRID **** rows::Int = 2000 cols::Int = 2000 alphaX = [sin(i / 100) * cos(j / 100) + 1 for i in 1:rows, j in 1:cols] alphaY = [cos(i / 100) * sin(j / 100) + 1 for i in 1:rows, j in 1:cols] grid::Grid = Grid{Float64}(rows, cols, alphaX, alphaY) concentrations = [(i * j) / 1e6 for i in 1:rows, j in 1:cols] concentrations[1001, 1001] = 2000 setConcentrations!(grid, concentrations) # **** BOUNDARY **** bc::Boundary = Boundary(grid) setBoundarySideClosed!(bc, LEFT) setBoundarySideClosed!(bc, RIGHT) setBoundarySideClosed!(bc, TOP) setBoundarySideConstant!(bc, BOTTOM, 0.75) # **** SIMULATION **** simulation::Simulation = Simulation(grid, bc, FTCS) simulation = setTimestep(simulation, 0.005) simulation = setIterations(simulation, 500) simulation = setOutputConsole(simulation, CONSOLE_OUTPUT_OFF) simulation = setOutputCSV(simulation, CSV_OUTPUT_ON) # **** RUN SIMULATION **** print((@elapsed run(simulation)) * 1e9) end main()