Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement EDFM loading from VTK (serial only) #3082

Open
wants to merge 38 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d77d082
initial embedded surface block abc
ouassimkh Sep 6, 2023
35196c8
minor change
ouassimkh Sep 7, 2023
2135a21
start concrete implementation
ouassimkh Sep 13, 2023
7eb79a5
add the cpp
ouassimkh Sep 13, 2023
b20dd27
add embedded surfaces to CellBlockManager
ouassimkh Sep 15, 2023
738c14a
this should not be commited
Sep 29, 2023
2fcdeed
upate cellBlock Manger and embedded Ruface block
ouassimkh Sep 27, 2023
186a222
Correct edfm to cell type
ouassimkh Oct 26, 2023
2401cc7
corrections
ouassimkh Apr 16, 2024
e2346e7
create edfm patches in bulk
ouassimkh Apr 9, 2024
c42b37f
small changes
ouassimkh Apr 17, 2024
55239bd
add flag to enable experimentation
ouassimkh Apr 18, 2024
4b2363e
missed files
ouassimkh Apr 18, 2024
0fde8c6
add bulk edfm fracs
ouassimkh Apr 26, 2024
dd8d49e
All is running
ouassimkh Apr 29, 2024
2e43180
uncrustify pass
ouassimkh Apr 29, 2024
cd555e0
start VTK edfm support
ouassimkh Jun 4, 2024
041d290
Finish EDFM loading from VTK (no parallel)
ouassimkh Jun 24, 2024
3bda862
builds after master rebase issues
ouassimkh Oct 31, 2024
256efee
working serial run
ouassimkh Nov 5, 2024
2d6583d
clearning
ouassimkh Nov 7, 2024
8d52abc
cleraning
ouassimkh Nov 8, 2024
c718d96
bug
ouassimkh Nov 8, 2024
ba87177
uncrustify pass
ouassimkh Nov 8, 2024
6d70f05
remove comments
ouassimkh Nov 11, 2024
c4a913b
use faceBlockName + some fixes for build (#3436)
paveltomin Nov 11, 2024
584a601
add edfm vtk example
ouassimkh Nov 13, 2024
29a20e8
Merge branch 'develop' into Feature/ouassim/edfm_loader_new
paveltomin Nov 20, 2024
7b9014e
Merge branch 'develop' into Feature/ouassim/edfm_loader_new
rrsettgast Nov 22, 2024
31118bb
Merge branch 'develop' into Feature/ouassim/edfm_loader_new
paveltomin Dec 2, 2024
5caf9aa
Merge branch 'develop' into Feature/ouassim/edfm_loader_new
paveltomin Dec 9, 2024
c84e27a
build fix
Dec 9, 2024
b4a5df4
remove
Dec 10, 2024
cec6ed2
Merge branch 'develop' into Feature/ouassim/edfm_loader_new
paveltomin Dec 12, 2024
b079426
Merge branch 'develop' into Feature/ouassim/edfm_loader_new
paveltomin Dec 16, 2024
3e0357e
doxygen fix
Dec 16, 2024
1388970
fix one crash and introduce another
Dec 16, 2024
ef54e9c
just to see if test fail because of this
paveltomin Dec 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions inputFiles/singlePhaseFlowFractures/edfm_vtk_fractures.vtu
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
<UnstructuredGrid>
<Piece NumberOfPoints="6" NumberOfCells="2">
<PointData>
<DataArray type="Int32" Name="fracture_ids_points" NumberOfComponents="1" format="ascii">
0
1
2
3
4
5
</DataArray>
</PointData>
<CellData>
<DataArray type="Int32" Name="fracture_to_parent_matrix_cell_mapping" NumberOfComponents="2" format="ascii">
0 4
1 13
</DataArray>
<DataArray type="Float32" Name="permeability" NumberOfComponents="1" format="ascii" RangeMin="0.1" RangeMax="0.1">
0.1
0.1
</DataArray>
<DataArray type="Float32" Name="aperture" NumberOfComponents="1" format="ascii" RangeMin="0.0001" RangeMax="0.0001">
0.0001
0.0001
</DataArray>
<DataArray type="Float32" Name="tangential_width_vectors" NumberOfComponents="3" format="ascii">
0 0 1
0 0 1
</DataArray>
<DataArray type="Float32" Name="tangential_length_vectors" NumberOfComponents="3" format="ascii">
0 1 0
0 1 0
</DataArray>
<DataArray type="Float32" Name="normal_vectors" NumberOfComponents="3" format="ascii">
1 0 0
1 0 0
</DataArray>
</CellData>
<Points>
<DataArray type="Float32" Name="Points" NumberOfComponents="3" format="ascii" RangeMin="0" RangeMax="1">
0.5 0.3333 0
0.5 0.6666 0
0.5 0.3333 0.5
0.5 0.6666 0.5
0.5 0.3333 1
0.5 0.6666 1
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0
</Value>
<Value index="1">
1
</Value>
</InformationKey>
</DataArray>
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="ascii" RangeMin="0" RangeMax="5">
1 0 2 3
3 2 4 5
</DataArray>
<DataArray type="Int64" Name="offsets" format="ascii" RangeMin="4" RangeMax="8">
4
8
</DataArray>
<DataArray type="UInt8" Name="types" format="ascii" RangeMin="9" RangeMax="9">
9
9
</DataArray>
</Cells>
</Piece>
</UnstructuredGrid>
</VTKFile>
122 changes: 122 additions & 0 deletions inputFiles/singlePhaseFlowFractures/edfm_vtk_matrix.vtu
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<VTKFile type="UnstructuredGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64">
<UnstructuredGrid>
<Piece NumberOfPoints="48" NumberOfCells="18">
<PointData GlobalIds="GLOBAL_IDS_POINTS">
<DataArray type="Int64" IdType="1" Name="GLOBAL_IDS_POINTS" format="ascii" RangeMin="0" RangeMax="47">
0 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
</DataArray>
</PointData>
<CellData GlobalIds="GLOBAL_IDS_CELLS">
<DataArray type="Int64" Name="split" format="ascii" RangeMin="0" RangeMax="0">
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
</DataArray>
<DataArray type="Int64" IdType="1" Name="GLOBAL_IDS_CELLS" format="ascii" RangeMin="0" RangeMax="17">
0 1 2 3 4 5
6 7 8 9 10 11
12 13 14 15 16 17
</DataArray>
</CellData>
<Points>
<DataArray type="Float32" Name="Points" NumberOfComponents="3" format="ascii" RangeMin="0" RangeMax="1">
0 0 0
0.333 0 0
0.666 0 0
1 0 0
0 0.333 0
0.333 0.333 0
0.666 0.333 0
1 0.333 0
0 0.666 0
0.333 0.666 0
0.666 0.666 0
1 0.666 0
0 1 0
0.333 1 0
0.666 1 0
1 1 0
0 0 0.5
0.333 0 0.5
0.666 0 0.5
1 0 0.5
0 0.333 0.5
0.333 0.333 0.5
0.666 0.333 0.5
1 0.333 0.5
0 0.666 0.5
0.333 0.666 0.5
0.666 0.666 0.5
1 0.666 0.5
0 1 0.5
0.333 1 0.5
0.666 1 0.5
1 1 0.5
0 0 1
0.333 0 1
0.666 0 1
1 0 1
0 0.333 1
0.333 0.333 1
0.666 0.333 1
1 0.333 1
0 0.666 1
0.333 0.666 1
0.666 0.666 1
1 0.666 1
0 1 1
0.333 1 1
0.666 1 1
1 1 1
<InformationKey name="L2_NORM_RANGE" location="vtkDataArray" length="2">
<Value index="0">
0
</Value>
<Value index="1">
1.7320508076
</Value>
</InformationKey>
</DataArray>
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="ascii" RangeMin="0" RangeMax="47">
0 1 5 4 16 17 21 20
1 2 6 5 17 18 22 21
2 3 7 6 18 19 23 22
4 5 9 8 20 21 25 24
5 6 10 9 21 22 26 25
6 7 11 10 22 23 27 26
8 9 13 12 24 25 29 28
9 10 14 13 25 26 30 29
10 11 15 14 26 27 31 30
16 17 21 20 32 33 37 36
17 18 22 21 33 34 38 37
18 19 23 22 34 35 39 38
20 21 25 24 36 37 41 40
21 22 26 25 37 38 42 41
22 23 27 26 38 39 43 42
24 25 29 28 40 41 45 44
25 26 30 29 41 42 46 45
26 27 31 30 42 43 47 46
</DataArray>
<DataArray type="Int64" Name="offsets" format="ascii" RangeMin="8" RangeMax="144">
8 16 24 32 40 48
56 64 72 80 88 96
104 112 120 128 136 144
</DataArray>
<DataArray type="UInt8" Name="types" format="ascii" RangeMin="12" RangeMax="12">
12 12 12 12 12 12
12 12 12 12 12 12
12 12 12 12 12 12
</DataArray>
</Cells>
</Piece>
</UnstructuredGrid>
</VTKFile>
138 changes: 138 additions & 0 deletions inputFiles/singlePhaseFlowFractures/fractureMatrixFlow_edfm_vtk.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<?xml version="1.0" ?>

<Problem>
<Solvers
gravityVector="{ 0.0, 0.0, -9.81 }">
<SinglePhaseFVM
name="SinglePhaseFlow"
logLevel="1"
discretization="singlePhaseTPFA"
targetRegions="{ RockMatrix, Fracture }">
<NonlinearSolverParameters
newtonTol="1.0e-6"
newtonMaxIter="8"/>
<LinearSolverParameters
directParallel="0"/>
</SinglePhaseFVM>

<EmbeddedSurfaceGenerator
name="SurfaceGenerator"
logLevel="1"
discretization="FE1"
targetRegions="{ RockMatrix, Fracture }"
fractureRegion="Fracture"
targetObjects="{ FracturePlane }"
mpiCommOrder="1"/>
</Solvers>

<NumericalMethods>
<FiniteVolume>
<TwoPointFluxApproximation
name="singlePhaseTPFA"/>
</FiniteVolume>
<FiniteElements>
<FiniteElementSpace
name="FE1"
order="1"/>
</FiniteElements>
</NumericalMethods>

<ElementRegions>
<CellElementRegion
name="RockMatrix"
cellBlocks="{ hexahedra }"
materialList="{ water, rock }"/>

<SurfaceElementRegion
name="Fracture"
faceBlock = "edfm_vtk_fractures"
defaultAperture="1e-3"
materialList="{ water, fractureFilling }"
subRegionType="embeddedElement"/>
</ElementRegions>

<Constitutive>
<CompressibleSinglePhaseFluid
name="water"
defaultDensity="1000"
defaultViscosity="0.001"
referencePressure="0.0"
compressibility="0.0"
viscosibility="0.0"/>

<CompressibleSolidParallelPlatesPermeability
name="fractureFilling"
solidModelName="nullSolid"
porosityModelName="fracturePorosity"
permeabilityModelName="fracturePerm"/>

<CompressibleSolidConstantPermeability
name="rock"
solidModelName="nullSolid"
porosityModelName="rockPorosity"
permeabilityModelName="rockPerm"/>

<NullModel
name="nullSolid"/>

<PressurePorosity
name="rockPorosity"
defaultReferencePorosity="0.1"
referencePressure="0.0"
compressibility="0.0"/>

<ConstantPermeability
name="rockPerm"
permeabilityComponents="{ 2.0e-15, 2.0e-15, 2.0e-15 }"/>

<PressurePorosity
name="fracturePorosity"
defaultReferencePorosity="1.00"
referencePressure="0.0"
compressibility="0.0"/>

<ParallelPlatesPermeability
name="fracturePerm"/>
</Constitutive>

<FieldSpecifications>

<FieldSpecification
name="Porosity"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/RockMatrix/hexahedra"
fieldName="rockPorosity_referencePorosity"
scale="0.1"/>

<FieldSpecification
name="fracPorosity"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/Fracture"
fieldName="fracturePorosity_porosity"
scale="1.00"/>

<FieldSpecification
name="initialPressure"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/RockMatrix/hexahedra"
fieldName="pressure"
scale="0.0"/>

<FieldSpecification
name="sourceTerm"
objectPath="ElementRegions/RockMatrix/hexahedra"
fieldName="pressure"
scale="1e7"
setNames="{ source }"/>

<FieldSpecification
name="sinkTerm"
objectPath="ElementRegions/RockMatrix/hexahedra"
fieldName="pressure"
scale="0.0"
setNames="{ sink }"/>
</FieldSpecifications>
</Problem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" ?>

<Problem>
<Included>
<File name="./fractureMatrixFlow_edfm_vtk.xml" />
</Included>

<Mesh>
<VTKMesh
name="mesh1"
useGlobalIds="1"
embeddedSurfaceBlocks="{edfm_vtk_fractures}"
file="./main_edfm_vtk.vtm"/>
</Mesh>

<Geometry>
<Box
name="source"
xMin="{ -0.01, -0.01, -0.01 }"
xMax="{ 0.34, 0.34, 0.51 }"/>

<Box
name="sink"
xMin="{ 0.65, 0.65, 0.49 }"
xMax="{ 1.01, 1.01, 1.01 }"/>

</Geometry>

<Events
maxTime="2e3"
logLevel="3">
<SoloEvent
name="preFracture"
target="/Solvers/SurfaceGenerator"/>

<PeriodicEvent
name="solverApplications"
forceDt="1e3"
target="/Solvers/SinglePhaseFlow"/>

<PeriodicEvent
name="outputs"
target="/Outputs/vtkOutput"/>

<PeriodicEvent
name="restarts"
timeFrequency="1e3"
target="/Outputs/sidreRestart"/>
</Events>

<Outputs>
<VTK
name="vtkOutput"
plotFileRoot="fracMatFlow_edfm_horizontal"
plotLevel="2"
format="ascii"/>

<Restart
name="sidreRestart"/>
</Outputs>
</Problem>
Loading
Loading