IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

MATLAB Discussion :

MATLAB Reservoir Simulation Toolbox


Sujet :

MATLAB

  1. #1
    Membre à l'essai
    Homme Profil pro
    Ingénieur
    Inscrit en
    Août 2013
    Messages
    33
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur

    Informations forums :
    Inscription : Août 2013
    Messages : 33
    Points : 16
    Points
    16
    Par défaut MATLAB Reservoir Simulation Toolbox
    Bonjour tout le monde, je suis débutant en Matlab, je n'arrive pas à exécuter cet exemple disponible sur le site: https://www.sintef.no/projectweb/mrs...tion-tutorial/
    Merci d'avance.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    %Animated example
    %We will now simulate a simple transport problem between the wells. We will plot the empty grid and the wells, and in each time step we will visualize the saturation in the cells where the inejcted phase is above a threshold, here 0.05.
    % Disable gravity
    %gravity off
    % Set up uniform permeability and constant porosity
    G = cartGrid([10, 10, 3]);
    G = computeGeometry(G);
    rock.perm = repmat(100*milli*darcy, [G.cells.num, 1]);
    rock.poro = repmat(0.5            , [G.cells.num, 1]);
    % A simple two phase system.
    fluid = initSimpleFluid("mu" , [   1,  10]*centi*poise     , ...
                                "rho", [1014, 859]*kilogram/meter^3, ...
                                "n"  , [   2,   2]);
    % Two wells, an injector at 1 bar and a producer at 0 bar.
    W = verticalWell([], G, rock, 1, 1, [], ...
                'Type', 'bhp' , 'Val', 1*barsa(), ...
                'Radius', 0.1, 'InnerProduct', 'ip_tpf', ...
                'Comp_i', [0, 1]);
     
    W = verticalWell(W, G, rock, 10, 10, [], ...
                "Type", "bhp" , "Val", 0*barsa(), ...
                "Radius", 0.1, "InnerProduct", "ip_tpf", ...
                "Comp_i", [1, 0]);
     
    % Create a initialized state and set initial saturation to phase 1.
    sol = initState(G, [], 0, [1, 0]);
     
    % Find transmissibility.
    T = computeTrans(G, rock);
    dT = 10*day;
    % Reference TPFA
    psolve = @(state) incompTPFA(state, G, T, fluid, "wells", W);
    %psolve = @(state) incompTPFA(state, G, T, fluid, "wellSol", W);
     
    % Implicit transport solver
    tsolve = @(state, dT) implicitTransport(state, G, dT, rock, ...
                                     %              fluid, "wells", W);
                                                   fluid, "wellSol", W);
    for i = 1:20
    %    sol = tsolve(sol, dT);  %le code signale error
        sol = psolve(sol);
        clf;
        %plotGrid(G) %It grid all the volume
        plotGrid(G, "FaceAlpha", 0, "EdgeAlpha", .1)
        plotCellData(G, sol.s(:,2), sol.s(:,2)>0.05)
        %plotCellData(G, sol.pressure, j == round(G.cartDims(2)/2))
        plotWell(G, W);
        view(30,50);
        pause(.5)
    end

  2. #2
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    Quel est le problème exactement ?
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  3. #3
    Membre à l'essai
    Homme Profil pro
    Ingénieur
    Inscrit en
    Août 2013
    Messages
    33
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur

    Informations forums :
    Inscription : Août 2013
    Messages : 33
    Points : 16
    Points
    16
    Par défaut
    En activant la ligne 40, j'obtiens le message suivant:
    Pièce jointe 603857
    Images attachées Images attachées  

  4. #4
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    Cette Toolbox n'est peut être pas compatible avec Octave.
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  5. #5
    Membre à l'essai
    Homme Profil pro
    Ingénieur
    Inscrit en
    Août 2013
    Messages
    33
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur

    Informations forums :
    Inscription : Août 2013
    Messages : 33
    Points : 16
    Points
    16
    Par défaut
    Est-ce qu'il y a son équivalent en Octave ?

Discussions similaires

  1. Réponses: 2
    Dernier message: 24/03/2011, 10h13
  2. Matlab Data Acquisition Toolbox
    Par Mordenkainen dans le forum MATLAB
    Réponses: 4
    Dernier message: 08/06/2009, 11h00
  3. Réponses: 4
    Dernier message: 18/04/2007, 10h22
  4. Où trouver la "Maple toolbox for Matlab"
    Par samoudwfr dans le forum Maple
    Réponses: 1
    Dernier message: 29/03/2007, 15h31
  5. MATLAB C++ library toolbox
    Par Cap123 dans le forum MATLAB
    Réponses: 1
    Dernier message: 04/12/2006, 11h51

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo