It is possible to start a Stokes-Brinkman or Naviers-Stokes-Brinkman flow simulation with SimpleFFT where each voxel can have a different permeability.
This can be done by providing the solver your own .gfr file. These *.gfr files are used to represent flow resistivities (i.e. viscosity / permeability) per voxel.
In addition, it is possible to use gray values of a CT scan and convert them with a user defined "gray value to permeability" map to get a permeability value for each voxel.How to simulate Stokes-Brinkman flows with your own (*.gfr) flow resistivity file (manually):
How to simulate Stokes-Brinkman flows using your own "gray value to permeability" map values (automatically):
- Go to menu "Options" -> "Edit Expert Settings ...". Then add the two following expert settings:
- Add Row -> Module "FlowDict" -> Command "SolveSimpleFFTStokes" -> Key "Permeabilities:GfrInputMode" -> Value "1".
- Add Row -> Module "FlowDict" -> Command "SolveSimpleFFTStokes" -> Key "Permeabilities:GfrFileName" -> Value (enter the full path of the GFR file here, e.g. /home/linden/flow_resistivity.gfr).
- Go to module "FlowDict" and adjust the solver options for "Stokes (SimpleFFT)" according to your needs.
- Run the simulation.
This can be done with a GeoPython script. Please find the script together with an example file in the attachment.
The script will convert the gray value image with a .csv file into a *.gfr file automatically and starts a flow simulation.
In addition, the script will consider only gray values where the corresponding material type is a porous material.
Solid materials will get zero permeability and pore materials will get an infinite permeability.
How to prepare the simulation:
- Create a .csv file that maps the gray values to the corresponding permeability correctly.
The .csv file has to consist of two lines where numbers are separated by commas (see an example in the attached file).
The first line indicates different gray values and the second line indicates different corresponding permeability values.
- Load gray values (e.g. *.tif or *.raw files) with "ImportGeo Vol -> Image Processing".
As soon as the image processing window opens, the gray value image is loaded as Volume Field in GeoDict.
- You can do image processing and segment your gray values into different material phases.
- Open the "Constituent Materials" dialog and assign the different material phases to be either pore, solid, or porous material.
- Open the "Execute Macro" dialog and select the script "ComputeFlowWithOwnPermeabilityModel.py" from the zip file.
Adjust the result file name and select a .csv file used for the simulation.
- Run the GeoPython script.
The script performs the following operations:
- Run SimpleFFT to obtain a .gfr file with correct structure dimensions.
- Load the .gfr file from the previous SimpleFFT run and reassign the flow resistivity based on the loaded gray value image.
- Run SimpleFFT to solve Stokes-Brinkman with permeability of the provided .csv together with the gray value image file based on a linear mapping approach.
This feature will be available using LIR in GeoDict 2022 too, but the script has to be adjusted accordingly.