DFNgen  2.0
DFN Model Generator
readInput.cpp File Reference
#include <iostream>
#include <fstream>
#include <vector>
#include <math.h>
#include <cstdlib>
#include <string>
#include "input.h"
#include "readInputFunctions.h"
#include "generatingPoints.h"
Include dependency graph for readInput.cpp:

Go to the source code of this file.

Functions

void getInput (char *input, std::vector< Shape > &shapeFamily)
 
void printInputVars ()
 

Variables

short stopCondition
 
unsigned int nPoly
 
double domainSize [3]
 
double h
 
float radiiListIncrease
 
bool disableFram
 
bool visualizationMode
 
bool tripleIntersections
 
bool boundaryFaces [6]
 
bool keepOnlyLargestCluster
 
bool printRejectReasons
 
bool outputFinalRadiiPerFamily
 
bool outputAcceptedRadiiPerFamily
 
bool * ebetaDistribution
 
bool * rbetaDistribution
 
bool insertUserRectanglesFirst
 
bool forceLargeFractures
 
unsigned int seed
 
float domainSizeIncrease [3]
 
int nFamRect
 
int nFamEll
 
float * famProb
 
float * famProbOriginal
 
int * edistr
 
float * easpect
 
unsigned int * enumPoints
 
bool eAngleOption
 
float * etheta
 
float * ephi
 
float * ebeta
 
float * ekappa
 
float * eLogMean
 
float * esd
 
float * eExpMean
 
float * rLogMin
 
float * rLogMax
 
float * rExpMin
 
float * rExpMax
 
float * eLogMin
 
float * eLogMax
 
float * eExpMin
 
float * eExpMax
 
float * econst
 
float * emin
 
float * emax
 
float * ealpha
 
float * e_p32Targets
 
unsigned int * rdistr
 
float * raspect
 
bool rAngleOption
 
float removeFracturesLessThan
 
float * rtheta
 
float * rphi
 
float * rbeta
 
float * rkappa
 
float * rLogMean
 
float * rsd
 
float * rmin
 
float * rmax
 
float * ralpha
 
float * r_p32Targets
 
float * rExpMean
 
float * rconst
 
bool userEllipsesOnOff
 
int nUserEll
 
bool ueAngleOption
 
float * ueRadii
 
float * ueBeta
 
float * ueaspect
 
double * uetranslation
 
double * uenormal
 
unsigned int * uenumPoints
 
bool userRectanglesOnOff
 
bool userRecByCoord
 
bool userEllByCoord
 
bool permOption
 
bool outputAllRadii
 
int nUserRect
 
float * urRadii
 
bool urAngleOption
 
float * urBeta
 
float * uraspect
 
double * urtranslation
 
double * urnormal
 
unsigned int nRectByCoord
 
unsigned int nEllByCoord
 
unsigned int nEllNodes
 
double * userRectCoordVertices
 
double * userEllCoordVertices
 
float meanAperture
 
float stdAperture
 
int aperture
 
float apertureFromTransmissivity [2]
 
double constantAperture
 
double lengthCorrelatedAperture [2]
 
double constantPermeability
 
int rejectsPerFracture
 
float * layers
 
float * layerVol
 
int * rLayer
 
int * eLayer
 
bool * p32Status
 
bool ignoreBoundaryFaces
 
int numOfLayers
 

Function Documentation

§ getInput()

void getInput ( char *  input,
std::vector< Shape > &  shapeFamily 
)

Reads in all input variables. Creates Shape structure array from user input if using stochastic fracture families.

Arg 1: Path to input file Arg 2: OUTPUT, Shape array to store stochastic families

Definition at line 485 of file readInput.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ printInputVars()

void printInputVars ( )

Definition at line 1245 of file readInput.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

§ aperture

int aperture

1 - Log-normal distribution 2 - Aperture from transmissivity, first transmissivity is defined, and then, using a cubic law, the aperture is calculated. 3 - Constant aperture (same aperture for all fractures) 4 - Length Correlated Aperture Apertures are defined as a function of fracture size.

Definition at line 413 of file readInput.cpp.

§ apertureFromTransmissivity

float apertureFromTransmissivity[2]

Transmissivity is calculated as transmissivity = F*R^k, where F is a first element in aperturefromTransmissivity, k is a second element and R is a mean radius of a polygon. Aperture is calculated according to cubic law as b = (transmissivity*12)^(1/3)

Definition at line 420 of file readInput.cpp.

§ boundaryFaces

bool boundaryFaces[6]

DFN will only keep clusters with connections to domain boundaries which are set to 1:

boundaryFaces[0] = +X domain boundary boundaryFaces[1] = -X domain boundary boundaryFaces[2] = +Y domain boundary boundaryFaces[3] = -Y domain boundary boundaryFaces[4] = +Z domain boundary boundaryFaces[5] = -Z domain boundary

Definition at line 52 of file readInput.cpp.

§ constantAperture

double constantAperture

Sets all fracture apertures to constantAperture.

Definition at line 423 of file readInput.cpp.

§ constantPermeability

double constantPermeability

Permeability for all fractures

Definition at line 432 of file readInput.cpp.

§ disableFram

bool disableFram

This option disables the FRAM algorithm. There will be no fracture rejections or fine mesh. Defaults visualizationMode to 1

Definition at line 30 of file readInput.cpp.

§ domainSize

double domainSize[3]

Domain size with dimension x*y*z for DFN, centered at the origin.

Definition at line 18 of file readInput.cpp.

§ domainSizeIncrease

float domainSizeIncrease[3]

Size increase for inserting fracture centers outside the domain. Fracture will be truncated based on domainSize above. Increases the entire width by this ammount. So, {1,1,1} will increase the domain by adding .5 to the +x, and subbtracting .5 to the -x, etc

Definition at line 111 of file readInput.cpp.

§ e_p32Targets

float* e_p32Targets

Elliptical families target fracture intensities per family when using stopCondition = 1, P32 option.

Definition at line 232 of file readInput.cpp.

§ ealpha

float* ealpha

Truncated power-law ellipse distribution parameter.

Definition at line 228 of file readInput.cpp.

§ eAngleOption

bool eAngleOption

All angles for ellipses are in: 0 - degrees 1 - radians (Must use numerical value for PI)

Definition at line 163 of file readInput.cpp.

§ easpect

float* easpect

Aspect ratio array for stochastic ellipses.

Definition at line 151 of file readInput.cpp.

§ ebeta

float* ebeta

Rotation around the fractures' normal vector. Ellipse family parameter.

Definition at line 178 of file readInput.cpp.

§ ebetaDistribution

bool* ebetaDistribution

Beta is the rotation around the polygon's normal vector 0 - Uniform distribution [0, 2PI) 1 - Constant angle (specefied below by 'ebeta')

Definition at line 87 of file readInput.cpp.

§ econst

float* econst

Contant ellipse parameter. Constant radius.

Definition at line 219 of file readInput.cpp.

§ edistr

int* edistr

Mandatory parameter if using statistically generated ellipses. Statistical distribution options:

Holds number of elements equal to the number of shape families.

1 - Log-normal distribution
2 - Truncated power law distribution
3 - Exponential distribution
4 - Constant 

Definition at line 148 of file readInput.cpp.

§ eExpMax

float* eExpMax

Exponential ellipse parameter. Maximum radius.

Definition at line 216 of file readInput.cpp.

§ eExpMean

float* eExpMean

Exponential ellipse parameter. Mean values for exponential distributions, defined per family.

Definition at line 192 of file readInput.cpp.

§ eExpMin

float* eExpMin

Exponential ellipse parameter. Minimum radius.

Definition at line 213 of file readInput.cpp.

§ ekappa

float* ekappa

Parameter for the fisher distribnShaprutions. The bigger, the more similar (less diverging) are the elliptical familiy's normal vectors.

Definition at line 183 of file readInput.cpp.

§ eLayer

int* eLayer

Defines which domain, or layer, the family belings to. Layer 0 is the entire domain ('domainSize'). Layers numbered > 0 coorespond to layers defined above (see 'Layers:'). 1 corresponts to the first layer listed, 2 is the next layer listed, etc

Definition at line 459 of file readInput.cpp.

§ eLogMax

float* eLogMax

Log-normal ellipse parameter. Maximum radius.

Definition at line 210 of file readInput.cpp.

§ eLogMean

float* eLogMean

Log-normal ellipse parameter. Mean of the underlying normal distribution.

Definition at line 186 of file readInput.cpp.

§ eLogMin

float* eLogMin

Log-normal ellipse parameter. Minimum radius.

Definition at line 207 of file readInput.cpp.

§ emax

float* emax

Truncated power-law ellipse parameter. Maximum radius.

Definition at line 225 of file readInput.cpp.

§ emin

float* emin

Truncated power-law ellipse parameter. Minimum radius.

Definition at line 222 of file readInput.cpp.

§ enumPoints

unsigned int* enumPoints

Number of vertices used in creating each elliptical fracture family. Number of elements must match number of ellipse families

Holds number of elements equal to the number of ellipse families.

Definition at line 158 of file readInput.cpp.

§ ephi

float* ephi

Ellipse fracture orientation. The angle the projection of the normal onto the x-y plane makes with the x-axis Ellipse family parameter.

Definition at line 174 of file readInput.cpp.

§ esd

float* esd

Log-normal ellipse parameter. Standard deviation of the underlying normal distribution

Definition at line 189 of file readInput.cpp.

§ etheta

float* etheta

Ellipse fracture orientation. The angle the normal vector makes with the z-axis Ellipse family parameter.

Definition at line 168 of file readInput.cpp.

§ famProb

float* famProb

Each element is the probability of chosing a fracture from the element's corresponding family to be inserted into the DFN.

The famProb elements should add up to 1.0 (for %100). The probabilities are listed in order of families starting with all stochastic ellipses, and then all stochastic rectangles.

For example: If then there are two ellipse families, each with probabiliy .3, and two rectangle families, each with probabiliy .2, famProb will be: famProb: {.3,.3,.2,.2}, famProb elements must add to 1

Definition at line 133 of file readInput.cpp.

§ famProbOriginal

float* famProbOriginal

Holds a copy of famProb. famProb elements can change as different families hit their P32 requirement when using the P32 stopCondition option.

Definition at line 137 of file readInput.cpp.

§ forceLargeFractures

bool forceLargeFractures

Inserts the largest possible fracture for each defined fracture family, defined by the user-defined maxium radius 0 - Off (Do not force insertion of larest fractures) 1 - On (Force insertion of largest fractures)

Definition at line 102 of file readInput.cpp.

§ h

double h

Minimum feature size, FRAM parameter.

Definition at line 21 of file readInput.cpp.

§ ignoreBoundaryFaces

bool ignoreBoundaryFaces

False - Use boundaryFaces option. True - Ignore boundaryFaces option, keep all clusters and remove fractures with no intersections

Definition at line 473 of file readInput.cpp.

§ insertUserRectanglesFirst

bool insertUserRectanglesFirst

False - User ellipses will be inserted first True - User rectangles will be inserted first

Definition at line 96 of file readInput.cpp.

§ keepOnlyLargestCluster

bool keepOnlyLargestCluster

0 - Keep any clusters which connects the specified boundary faces in boundaryFaces option below 1 - Keep only the largest cluster which connects the specified boundary faces in boundaryFaces option below.

If ignoreBoundaryFaces is also set to 1, DFNGen will keep the largest cluster which connects at least any two sides of the domain.

Definition at line 61 of file readInput.cpp.

§ layers

float* layers

Array of layers: e.g. {+z1, -z1, +z2, -z2, ... , +zn, -zn}

Definition at line 443 of file readInput.cpp.

§ layerVol

float* layerVol

Array of volumes for each defined layer, in the same order which layers were listed.

Definition at line 447 of file readInput.cpp.

§ lengthCorrelatedAperture

double lengthCorrelatedAperture[2]

Length Correlated Aperture Option: Aperture is calculated by: b=F*R^k, where F is a first element in lengthCorrelatedAperture, k is a second element and R is a mean radius of a polygon.

Definition at line 429 of file readInput.cpp.

§ meanAperture

float meanAperture

Log-normal aperture option. Mean of underlying normal distribution.

Definition at line 401 of file readInput.cpp.

§ nEllByCoord

unsigned int nEllByCoord

Number of user ellipses defined by coordinates.

Definition at line 386 of file readInput.cpp.

§ nEllNodes

unsigned int nEllNodes

Number of nodes for user defined ellipses by coordinates

Definition at line 389 of file readInput.cpp.

§ nFamEll

int nFamEll

Number of ellipse families defined below. Having this option = 0 will ignore all rectangle family variables.

Definition at line 120 of file readInput.cpp.

§ nFamRect

int nFamRect

Number of rectangular families defined below. Having this option = 0 will ignore all rectangular family variables.

Definition at line 116 of file readInput.cpp.

§ nPoly

unsigned int nPoly

Number of polygons to place in the DFN when uisng nPoly stopCondition option.

Definition at line 15 of file readInput.cpp.

§ nRectByCoord

unsigned int nRectByCoord

Number of user rectangles defined by coordinates.

Definition at line 383 of file readInput.cpp.

§ numOfLayers

int numOfLayers

Number of layers defined.

Definition at line 476 of file readInput.cpp.

§ nUserEll

int nUserEll

Number of defined, user defined ellipses.

Definition at line 309 of file readInput.cpp.

§ nUserRect

int nUserRect

Number of user defined rectangles.

Definition at line 360 of file readInput.cpp.

§ outputAcceptedRadiiPerFamily

bool outputAcceptedRadiiPerFamily

Outputs radii files before isolated fracture removal. One file per family. 0: Do not create output files of radii per family 1: Creates output files per family, containing a list of the family's fracture radii in the domain before isolated fracture removal.

Definition at line 82 of file readInput.cpp.

§ outputAllRadii

bool outputAllRadii

Caution: Can create very large files. Outputs all fractures which were generated during DFN generation (Accepted + Rejected). False: Do not output all radii file. True: Include file of all raddii, acepted + rejected fractures, in output files (radii_All.dat).

Definition at line 357 of file readInput.cpp.

§ outputFinalRadiiPerFamily

bool outputFinalRadiiPerFamily

Outputs radii files after isolated fracture removal. One file per family. 0: Do not create output files of radii per family 1: Creates output files per family, containing a list of the family's fracture radii that is in the final DFN

Definition at line 74 of file readInput.cpp.

§ p32Status

bool* p32Status

Global boolean array. Used with stopCondition = 1, P32 option. Number of elements is equal to the number of stochastic shape families. Elements correspond to families in the same order of the famProb array. Elements are initialized to false, and are set to true once the families p32 requirement is met. Once all elements have values all set to true, all families have had their P32 requirement

Definition at line 468 of file readInput.cpp.

§ permOption

bool permOption

False - Permeability of each fracture is a function of fracture aperture, given by k=(b^2)/12, where b is an aperture and k is permeability True - Constant permeabilty for all fractures

Definition at line 349 of file readInput.cpp.

§ printRejectReasons

bool printRejectReasons

Useful for debugging, This option will print all fracture rejection reasons as they occur. 0 - Disable 1 - Print all rejection reasons to screen

Definition at line 67 of file readInput.cpp.

§ r_p32Targets

float* r_p32Targets

Rectangular families target fracture intensities per family when using stopCondition = 1, P32 option.

Definition at line 296 of file readInput.cpp.

§ radiiListIncrease

float radiiListIncrease

Percent to increase the size of the pre-generated radii lists, per family. Example: 0.2 will increase the size of the list by %20. See example input files for more details.

Definition at line 26 of file readInput.cpp.

§ ralpha

float* ralpha

Truncated power-law rectangle distribution parameter.

Definition at line 292 of file readInput.cpp.

§ rAngleOption

bool rAngleOption

All angles from input file for stochastic rectangles are in: True - Degrees False - Radians

Definition at line 251 of file readInput.cpp.

§ raspect

float* raspect

Aspect ratio for stochasic rectangles.

Definition at line 246 of file readInput.cpp.

§ rbeta

float* rbeta

Rotation around the normal vector.

Definition at line 272 of file readInput.cpp.

§ rbetaDistribution

bool* rbetaDistribution

Beta is the rotation around the polygon's normal vector 0: Uniform distribution [0, 2PI) 1: Constant angle (specefied below by 'rbeta')

Definition at line 92 of file readInput.cpp.

§ rconst

float* rconst

Constant rectangle parameter. Constant radius.

Definition at line 302 of file readInput.cpp.

§ rdistr

unsigned int* rdistr

Mandatory parameter if using statistically generated rectangles.

Holds number of elements equal to the number of shape families.\

Rectangle statistical distribution options: 1 - log-normal distribution 2 - truncated power law distribution 3 - exponential distribution 4 - constant

Definition at line 243 of file readInput.cpp.

§ rejectsPerFracture

int rejectsPerFracture

If a fracture is rejected, it will be re-translated to a new position this number of times.

This helps hit distribution targets for stochastic families families (Set to 1 to ignore this feature)

Definition at line 439 of file readInput.cpp.

§ removeFracturesLessThan

float removeFracturesLessThan

0 - Ignore this option, keep all fractures.

>0 - Size of minimum fracture radius. Fractures smaller than defined radius will be removed AFTER DFN generation.

Minimum and maximum size options under fracture family distributions will still be used while generating the DFN.

Definition at line 260 of file readInput.cpp.

§ rExpMax

float* rExpMax

Exponential rectangle parameter. Maximum radius.

Definition at line 204 of file readInput.cpp.

§ rExpMean

float* rExpMean

Exponential rectangle parameter. Maximum radius.

Definition at line 299 of file readInput.cpp.

§ rExpMin

float* rExpMin

Exponential rectangle parameter. Minimum radius.

Definition at line 201 of file readInput.cpp.

§ rkappa

float* rkappa

Parameter for the fisher distribnShaprutions. The bigger, the more similar (less diverging) are the rectangle familiy's normal vectors.

Definition at line 277 of file readInput.cpp.

§ rLayer

int* rLayer

Definition at line 453 of file readInput.cpp.

§ rLogMax

float* rLogMax

Log-normal rectangle parameter. Maximum radius.

Definition at line 198 of file readInput.cpp.

§ rLogMean

float* rLogMean

Log-normal rectangle parameter. Standard deviation of the underlying normal distribution

Definition at line 280 of file readInput.cpp.

§ rLogMin

float* rLogMin

Log-normal rectangle parameter. Minimum radius.

Definition at line 195 of file readInput.cpp.

§ rmax

float* rmax

Truncated power-law rectangle parameter. Maximum radius.

Definition at line 289 of file readInput.cpp.

§ rmin

float* rmin

Truncated power-law rectangle parameter. Minimum radius.

Definition at line 286 of file readInput.cpp.

§ rphi

float* rphi

Rectangle fracture orientation. The angle the projection of the normal onto the x-y plane makes with the x-axis

Definition at line 269 of file readInput.cpp.

§ rsd

float* rsd

Log-normal rectangle parameter. Standard deviation of the underlying normal distribution

Definition at line 283 of file readInput.cpp.

§ rtheta

float* rtheta

Rectangle fracture orientation. The angle the normal vector makes with the z-axis

Definition at line 264 of file readInput.cpp.

§ seed

unsigned int seed

Seed for random generator.

Definition at line 105 of file readInput.cpp.

§ stdAperture

float stdAperture

Log-normal aperture option. Standard deviation of underlying normal distribution.

Definition at line 405 of file readInput.cpp.

§ stopCondition

short stopCondition

DFN generation stop condition. 0 - nPoly option, 1 - P32 option.

Definition at line 12 of file readInput.cpp.

§ tripleIntersections

bool tripleIntersections

Accept or reject triple intersections False - Off (Reject) True - On (Accept)

Definition at line 41 of file readInput.cpp.

§ ueAngleOption

bool ueAngleOption

All angles from input file for stochastic ellipses are in: True - Degrees False - Radians

Definition at line 314 of file readInput.cpp.

§ ueaspect

float* ueaspect

User ellipses aspect ratio array.

Definition at line 323 of file readInput.cpp.

§ ueBeta

float* ueBeta

User ellipses beta array.

Definition at line 320 of file readInput.cpp.

§ uenormal

double* uenormal

User ellipses normal vector array.

Definition at line 329 of file readInput.cpp.

§ uenumPoints

unsigned int* uenumPoints

User ellipses number of points per ellipse array.

Definition at line 332 of file readInput.cpp.

§ ueRadii

float* ueRadii

User ellipses radii array.

Definition at line 317 of file readInput.cpp.

§ uetranslation

double* uetranslation

User ellipses translation array.

Definition at line 326 of file readInput.cpp.

§ urAngleOption

bool urAngleOption

All angles from input file for stochastic rectangles are in: True - Degrees False - Radians

Definition at line 368 of file readInput.cpp.

§ uraspect

float* uraspect

User rectangles aspect ratio array.

Definition at line 374 of file readInput.cpp.

§ urBeta

float* urBeta

User rectangles beta array.

Definition at line 371 of file readInput.cpp.

§ urnormal

double* urnormal

User rectangles normal vector array.

Definition at line 380 of file readInput.cpp.

§ urRadii

float* urRadii

User rectangles radii array.

Definition at line 363 of file readInput.cpp.

§ urtranslation

double* urtranslation

User rectangles translation array.

Definition at line 377 of file readInput.cpp.

§ userEllByCoord

bool userEllByCoord

True - User ellipses defined by coordinates are being used. False - No ellpsies defined by coordinates are being used.

Definition at line 344 of file readInput.cpp.

§ userEllCoordVertices

double* userEllCoordVertices

Array of ellipse coordiates. Number of elements = 3 * nEllNodes * nEllByCoord

Definition at line 397 of file readInput.cpp.

§ userEllipsesOnOff

bool userEllipsesOnOff

True - The user is using user defined ellipses. False - No user defined ellipses are being used.

Definition at line 306 of file readInput.cpp.

§ userRecByCoord

bool userRecByCoord

True - User rectangles defined by coordinates are being used. False - No rectangles defined by coordinates are being used.

Definition at line 340 of file readInput.cpp.

§ userRectanglesOnOff

bool userRectanglesOnOff

True - The user is using user defined rectangles. False - No user defined rectangles are being used.

Definition at line 336 of file readInput.cpp.

§ userRectCoordVertices

double* userRectCoordVertices

Array of rectangle coordiates. Number of elements = 4 * 3 * nRectByCoord

Definition at line 393 of file readInput.cpp.

§ visualizationMode

bool visualizationMode

Used during meshing: 0 - Creates a fine mesh, according to h parameter; 1 - Produce only first round of triangulations. In this case no modeling of flow and transport is possible.

Definition at line 36 of file readInput.cpp.