Git Product home page Git Product logo

Comments (4)

julesghub avatar julesghub commented on July 30, 2024

Hi @hakertop ,
Glad you found the docker installation a convenience, that's what it's for.

In general the docker performance is below a native build as in includes non optimised code for the hardware of the host machine and there is a virtualisation layer.

Broadly speaking the Docker performance depends on 2 factors.

  1. Is the docker configuration appropriate for the host hardware.
    This is setup when you docker run. See https://docs.docker.com/config/containers/resource_constraints/
  2. Is the model appropriate for docker configuration.

Remember Underworld performance depends on the model - without know more I can't comment on it.

Could you single out an example model as a slow one that I can investigate?

Also what version of the docker are you trying?

from underworld2.

hakertop avatar hakertop commented on July 30, 2024

from underworld2.

hakertop avatar hakertop commented on July 30, 2024

Hi Julian,

I would like to know if you receive my messages. Do you think if I should run big model on HPC platform? I am not sure if the Underworld2 support the HPC platform. I find that it platform is relatively slow when I ran my model on the Docker.

Thanks,

from underworld2.

hakertop avatar hakertop commented on July 30, 2024

I think I should attach the code. I am testing 3D detachment folding.

`from underworld import UWGeodynamics as GEO
from underworld import visualisation as vis

u = GEO.UnitRegistry

velocity = 2.5 * u.centimeter / u.hour
model_length = 40. * u.centimeter
model_height = 10. * u.centimeter
refViscosity = 1e7 * u.pascal * u.second
bodyforce = 1560 * u.kilogram / u.metre3 * 9.81 * u.meter / u.second2

KL = model_length
Kt = KL / velocity
KM = bodyforce * KL2 * Kt2

GEO.scaling_coefficients["[length]"] = KL
GEO.scaling_coefficients["[time]"] = Kt
GEO.scaling_coefficients["[mass]"]= KM

Model = GEO.Model(elementRes=(48,48,12),
minCoord=(0. * u.centimeter, 0. * u.centimeter,-3.5 * u.centimeter),
maxCoord=(40. * u.centimeter,40. * u.centimeter, 6.5 * u.centimeter),
gravity=(0.0, 0.0, -9.81 * u.meter / u.second**2))

Model.outputDir="outputs_tutorial_IndentorB2"

Model.minViscosity = 1.0e5 * u.pascal * u.second
Model.maxViscosity = 1e12 * u.pascal * u.second
Model.density = 1560. * u.kilogram / u.metre**3

air = Model.add_material(name="Air", shape=GEO.shapes.Layer3D(top=Model.top, bottom=0.0u.centimetre))
sand1 = Model.add_material(name="Sand1", shape=GEO.shapes.Layer3D(top=air.bottom, bottom=Model.bottom))
sand2 = Model.add_material(name="Sand2", shape=GEO.shapes.Layer3D(top=-1.0 * u.centimetre, bottom=-1.5
u.centimetre))
microbeads = Model.add_material(name="Microbeads", shape=GEO.shapes.Layer3D(top=-2.5 * u.centimetre, bottom=-3.5*u.centimetre))

import numpy as np

npoints = 500
coords = np.ndarray((npointsnpoints, 3))
KX= np.linspace(GEO.nd(Model.minCoord[0]), GEO.nd(Model.maxCoord[0]), npoints)
KY= np.linspace(GEO.nd(Model.minCoord[1]), GEO.nd(Model.maxCoord[1]), npoints)
for i in range(len(KX)):
for j in range(len(KY)):
coords[npoints
i+j,0]=KX[i]
coords[npoints*i+j,1]=KY[j]

coords[:, 2] = GEO.nd(sand1.top)

Model.add_passive_tracers(name="Interface1", vertices=coords)

coords[:, 2] = GEO.nd(sand2.top)
Model.add_passive_tracers(name="Interface2", vertices=coords)

coords[:, 2] = GEO.nd(sand2.bottom)
Model.add_passive_tracers(name="Interface3", vertices=coords)

coords[:, 2] = GEO.nd(microbeads.top)
Model.add_passive_tracers(name="Interface4", vertices=coords)

coords[:, 2] = GEO.nd(microbeads.bottom)
Model.add_passive_tracers(name="Interface5", vertices=coords)

air.density = 10. * u.kilogram / u.metre3
sand1.density = 1560. * u.kilogram / u.metre
3
sand2.density = 1560. * u.kilogram / u.metre3
microbeads.density = 1480. * u.kilogram / u.metre
3

air.viscosity = 1.0e5 * u.pascal * u.second
sand1.viscosity = 1.0e12 * u.pascal * u.second
sand2.viscosity = 1.0e12 * u.pascal * u.second
microbeads.viscosity = 1.0e12 * u.pascal * u.second

sandFriction = np.tan(np.radians(36.0))
sandFrictionW = np.tan(np.radians(31.0))

microbeadsFriction = np.tan(np.radians(22.0))
microbeadsFrictionW = np.tan(np.radians(21.0))

sand1.plasticity = GEO.DruckerPrager(cohesion=10.*u.pascal, frictionCoefficient=sandFriction, frictionAfterSoftening=sandFrictionW)
sand2.plasticity = GEO.DruckerPrager(cohesion=10.*u.pascal, frictionCoefficient=sandFriction, frictionAfterSoftening=sandFrictionW)

#sand3.plasticity = GEO.DruckerPrager(cohesion=10.*u.pascal, frictionCoefficient=sandFriction, frictionAfterSoftening=sandFrictionW)
microbeads.plasticity = GEO.DruckerPrager(cohesion=10.*u.pascal, frictionCoefficient=microbeadsFriction, frictionAfterSoftening=microbeadsFrictionW)

Model.set_velocityBCs(left=[0.0,0.0,0.0],
right=GEO.MovingWall(velocity=-2.5 * u.centimetre / u.hour),
front=[None, 0.0, None],
back=[None, 0.0, None],
top=[None, None, None],
bottom=[None,0.0,0.0])

Model.init_model()

Model.solver.set_inner_method("mumps")
Model.solver.set_penalty(1e6)

Model.run_for(duration=4.0*u.hour, checkpoint_interval=10.0 * u.minutes)`

from underworld2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.