Giter Club home page Giter Club logo

festim's People

Contributors

allentro avatar ehodille avatar gabriele-ferrero avatar jhdark avatar kulaginvladimir avatar mougenj avatar phugoide avatar rajdeep1311 avatar remdelaportemathurin avatar samuelemeschini avatar shimwell avatar solstyce-lg avatar tadash10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

festim's Issues

Multi-layer

  • Subdomains:
  • Create a MeshFunction that contains the subdomains
  • Materials properties:
  • D coeff
  • Traps energy
  • Traps density
  • alpha
  • beta
  • Other
  • Solve in mol/m3 an not at.fr.

Update time before solving

I noticed that the time and expressions were updating after solving the system which will induce errors.

Timer

It would be nice to have a timer and to know how long did the calculation last.

Update time dependent BC

Currently BC aren't updating throughout the calculation.
apply_boundary_conditions() should be modified and be called at each time step in order to reassign bcs.

Initial conditions for concentrations

The user should be able to assign initial values for concentrations as parameters.
In case where nothing is set, the default value should be 0 for all the concentrations.

Convergence of multi-trapping

One way to do it would be to keep u_i as concentrations (and not number of traps) and just put N_0 on its own. I think the fact that the boundary conditions are set to zero for the number of traps can complicate things.

TDS starting time

Currently the beggining of TDS is hard coded. This has to be changed quick

3 traps

2 traps + 1 extrinsic one

Temperature sequence

The user should be able to create sequences for temperature instead of Timp, Trest, TDS, etc...

New BC with solubility and pressure

See "Tritium absorption and desorption in ITER relevant materials comparative study of tungsten dust and massive samples" C. Grisolia et al JNM (2015)

User friendly parameters

  • Materials parameters
  • Traps parameters
    • intrisic traps
    • extrinsic traps
  • Source term
  • 1D mesh
  • Temperature

Post processing: compute & export fluxes, integrals over domain, etc...

As in 3-MOT, users should be able to compute fluxes at surfaces, integrate over subdomains, etc.
The result will then be exported to a csv format for later use.

In parameters:

"exports": {
    "post_processing": {
        "heat_transfers": {
            "surface_flux": [1],
            "total_volume": [1],
            "volume_average": [1],
            "volume_minimum": [1],
            "volume_maximum": [1],
            "custom": [],
            "output_file": "file1.csv",
        },
        "tritium_diffusion": {
            "surface_flux": [1, 2],
            "total_volume": [1],
            "volume_minimum": [1],
            "volume_maximum": [1],
            "custom": ["assemble(res[0]*dx(1))"],
            "output_file": "file2.csv"
        },
    }
}

Simu with no traps (pure diffusion) crashes

The error is in FESTIM.initialising_solutions as ini_u is scalar whereas fenics.interpolate expects vector of rank 1.

Fix is to make sure variable expression is a tuple.

Mesh refinement

Being able to refine the mesh on the left hand side, so that we have roughly 5um/1500 = 0.003 um / cell in the first 5 um.

Data export optimisation

Current: The solver exports every time step in a xdmf file

Wished:

  1. The solver exports at several times chosen by the user
  2. The solver exports every dt_export
  3. The solver also exports as txt file

Boundary conditions from table

Users should be able to set time dependent BCs as interpolation of a 2D table.
Something like:

table = [[0, 2],
         [1, 2],
         [4, 5]]

where 0, 1, 4 are times and 2, 2, 5 are values at these times.
This table would then be interpolated and ideally put in an Expression() object that can be updated throughout the calculation.

Plots solutions

Being able to plot :

  • Solution at specific times (before TDS, before implantation...)

  • TDS spectrum

1D Refinement loops infinitely in some cases

When the initial number of cells is too small, it may happen that all the midpoints found aren't in the refinement zone, leading to an infinite loop.

It would be better to mesh first each material, then join the meshes and only then do the refinement

.csv file busy

Implement a loop that's wait for the file to be close or create a new one, thus avoiding the loss of data.

Temperature module

The user should be able to :

  • define an Expression()
  • import from .xml (โš ๏ธ non matching meshes...)
  • solve heat equation with a given set of boundary conditions

Time steps as array

Instead of just giving the first time step, the user should be able to give an array of times when he/she wants to do the calculation. This has the main advantages of :

  1. adding control to the adaptative step size
  2. adding the possibility to have the required temporal refinement

export parameters

Could be cool to export parameters in a json file.
At least :

  • BCs
  • Volumetric source term
  • materials
  • traps
  • Simulation parameters (time, dt, stepsize change ratio...)

Or allow the user to choose what parameters are to be exported.

Adaptative time step

It would be great to have an adaptative time step in order to optimise computation time. We would need to have a separate script that plots the time step as function of steps.

Generic number of traps

Find a way to avoid hard coding the number of simulated traps.
Replace:

P1 = FiniteElement('P', interval, 1)
element = MixedElement([P1, P1, P1, P1])
V = FunctionSpace(mesh, element)
W = FunctionSpace(mesh, 'P', 1)
V0 = FunctionSpace(mesh, 'DG', 0)
v_1, v_2, v_3, v_4 = TestFunctions(V)
testfunctions = [v_1, v_2, v_3, v_4]
u_1, u_2, u_3, u_4 = split(u)
solutions = [u_1, u_2, u_3, u_4]
ini_u = Expression(("0", "0", "0", "0"), degree=1)
u_n = interpolate(ini_u, V)
u_n1, u_n2, u_n3, u_n4 = split(u_n)
previous_solutions = [u_n1, u_n2, u_n3, u_n4]

    _u_1, _u_2, _u_3, _u_4 = u.split()

    # Save solution to file (.xdmf)
    _u_1.rename("solute", "label")
    _u_2.rename("trap_1", "label")
    _u_3.rename("trap_2", "label")
    _u_4.rename("trap_3", "label")
    xdmf_u_1.write(_u_1, t)
    xdmf_u_2.write(_u_2, t)
    xdmf_u_3.write(_u_3, t)
    xdmf_u_4.write(_u_4, t)

    total_trap1 = assemble(_u_2*dx)
    total_trap2 = assemble(_u_3*dx)
    total_trap3 = assemble(_u_4*dx)
    total_trap = total_trap1 + total_trap2 + total_trap3
    total_sol = assemble(_u_1*dx)

XDMF export: ["xdmf"]["functions"][] can be bigger than solutions[]

"traps": [
    {
        "energy": 0.87,
        "density": 1.3e-3*6.3e28,
        "materials": [1]
    },
    {
        "energy": 1.0,
        "density": 4e-4*6.3e28,
        "materials": [1]
    }],

"xdmf": {
    "functions": ['solute', '1', '2', '3', '4', 'retention'],
    "labels":  ['solute', 'trap_1', 'trap_2',
                'trap_3', 'trap_4', 'retention'],
    "folder": 'Solution'

here len(solutions) list will be 3+1 (retention) = 4 whereas len(["xdmf"]["functions"]) is 5. This should raise an error.

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.