Commit 21676316 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

remove uneeded testcase

parent 5830f3e4
Pipeline #9828 passed with stages
in 6 minutes and 15 seconds
a = 0.1;
L = a;
H = a;
y = 0;
lc = 0.1*a;
Point(1) = {-L/2,-H/2,0,lc};
Point(2) = {L/2,-H/2,0,lc};
Point(3) = {L/2,H/2,0,lc};
Point(4) = {-L/2,H/2,0,lc};
Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {4,3};
Line(4) = {1,4};
Line Loop(1) = {1,2,-3,-4};
Plane Surface(1) = {1};
Periodic Curve {2} = {4};
Physical Line("Left") = {4};
Physical Line("Right") = {2};
Physical Line("Bottom") = {1};
Physical Line("Top") = {3};
Physical Surface("Domain") = {1};
Physical Point("PtFix") = {1};
--------------- Validation ---------------
Mumps :
real 1m34,410s
user 4m47,858s
sys 0m10,317s
Petsc4py :
real 1m42,057s
user 1m42,046s
sys 0m8,980s
--------------- Large System ---------------
Info : 3015 nodes
Info : 6029 elements
Petsc4py : solve -> solve time : 0.08347344398498535
norm 0.004965926320995885
(-pctype lu) : solve -> solve time : 0.06065487861633301
norm 1.2983427011673492e-13
Mumps : solve -> solve time : 0.2062525749206543
norm 2.438715897264086e-12
Info : 11831 nodes
Info : 23661 elements
Petsc4py : solve -> solve time : 18.195677042007446
norm 0.8766884101260082
(-pctype lu) : solve -> solve time : 0.4824645519256592
norm 2.9472736779533918e-12
Mumps : solve -> solve time : 3.0425796508789062
norm 4.0581240108531514e-11
Info : 46691 nodes
Info : 93381 elements
Petsc4py : solve-> solve time : 4.880550384521484
norm 0.03733281828724139
(-pctype lu) : solve -> solve time : 4.615582466125488
norm 6.98626486832462e-12
Mumps : solve-> solve time : 181.19510173797607
norm 5.7735001534430365e-11
import numpy as np
# MigFlow - Copyright (C) <2010-2020>
# <Universite catholique de Louvain (UCL), Belgium
# Universite de Montpellier, France>
#
# List of the contributors to the development of MigFlow: see AUTHORS file.
# Description and complete License: see LICENSE file.
#
# This program (MigFlow) is free software:
# you can redistribute it and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program (see COPYING and COPYING.LESSER files). If not,
# see <http://www.gnu.org/licenses/>.
#!/usr/bin/env python
# TESTCASE DESCRIPTION
# Deposit of 3D particles in a box full of fluid.
from migflow import fluid
from migflow import time_integration
import numpy as np
import os
import time
import subprocess
# Define output directory
outputdir = "output"
if not os.path.isdir(outputdir) :
os.makedirs(outputdir)
# Create mesh
# lc = 0.05
# lc = 0.1
lc = 0.2
subprocess.call(["gmsh", "-2", "mesh.geo","-clscale",str(lc)])
# Physical parameters
g = np.array([0,0]) # gravity
rho = 1000 # fluid density
nu = 1e-3 # kinematic viscosity
# Numerical parameters
outf = 10 # number of iterations between output files
dt = 1 # time step
tEnd = 200 # final time
# Initial time and iteration
t = 0
ii = 0
#
# FLUID PROBLEM
#
fluid = fluid.FluidProblem(2,g,[nu*rho],[rho], solver_option="-pc_type lu")
#Set the mesh geometry for the fluid computation
fluid.load_msh("mesh.msh")
fluid.set_wall_boundary("Bottom", velocity=[0,0], pressure = 0)
fluid.set_wall_boundary("Top", velocity=[1,0])
#Set location of the particles in the mesh and compute the porosity in each computation cell
tic = time.time()
fluid.write_vtk(outputdir,0,0)
#
# COMPUTATION LOOP
#
while t < tEnd :
time_integration.iterate(fluid,None,dt,check_residual_norm=1e-6)
exit(0)
t += dt
# Output files writing
if ii %outf == 0 :
ioutput = int(ii/outf) + 1
fluid.write_vtk(outputdir, ioutput, t)
ii += 1
print("%i : %.2g/%.2g (cpu %.6g)" % (ii, t, tEnd, time.time() - tic))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment