Пример #1
0
 public SimulationCell(float initialPressure, float permeability, float porosity, FluidType initialfluid, float height)
 {
     pressure             = initialPressure;
     this.permeability    = permeability;
     this.porosity        = porosity;
     fluid                = initialfluid;
     lastObservedPressure = initialPressure;
     adjacentCells        = new List <SimulationCell>();
     this.height          = height; // factor this into pressure calculations?
 }
 public ProductionField(int x, int y, float initialPressure, float permeability, float averagePorosity, FluidType fluid, float cellSize)
 {
     xDims           = x;
     yDims           = y;
     simulationCells = new SimulationCell[x][];
     this.cellSize   = cellSize;
     // populate cartesian simulation cell array
     for (int i = 0; i < x; i++)
     {
         simulationCells[i] = new SimulationCell[y];
         for (int j = 0; j < y; j++)
         {
             simulationCells[i][j] = new SimulationCell(initialPressure, permeability, averagePorosity, fluid, cellSize);
         }
     }
     // Once all cells placed, link all cells to siblings
     for (int i = 0; i < x; i++)
     {
         for (int j = 0; j < y; j++)
         {
             foreach (var cell in GetCellNeighbours(i, j))
             {
                 simulationCells[i][j].AddAdjacentCell(cell);
             }
         }
     }
     // initialise simulation datastructures
     implicitCalculationMask   = GenerateImplicitMatrixMask();
     implicitCellMatrix        = buildCellMatrix();
     implicitCalculationMatrix = new float[xDims * yDims, xDims *yDims];
 }
Пример #3
0
 public ProductionWell(float radius, FluidType initialFluid, float depth)
 {
     averageRadius   = radius;
     containingFluid = initialFluid;
     bottomHoleDepth = depth;
 }