Skip to content

Commit 5a79627

Browse files
Merge pull request #951 from KratosMultiphysics/fluid-write-orchestrator-multistage
Fluid write with geometries
2 parents c88070a + fcc3c99 commit 5a79627

38 files changed

Lines changed: 383 additions & 112 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ dist
1515
*.tgz
1616
null
1717
__pycache__
18+
*.whl

dockers/dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Default values. Use --build-arg on build to change
2-
ARG pyversion=3.10.8
2+
ARG pyversion=3.11
33

44
# Base pyton image
55
FROM python:$pyversion
@@ -8,10 +8,14 @@ FROM python:$pyversion
88
# Update pip
99
RUN pip install --upgrade pip
1010

11-
ARG krversion=9.3.2
11+
ARG krversion=9.4.2
12+
13+
# WORKDIR /tmp
14+
# COPY ./wheels/ ./wheels/
1215

1316
# Install Kratos and dependencies
1417
RUN python3 -m pip install KratosMultiphysics-all==$krversion numpy
18+
# RUN python3 -m pip install ./wheels/*.whl
1519

1620
# Prepare run folder
1721
WORKDIR "/model"

kratos.gid/apps/Buoyancy/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"write": {
3838
"coordinates": "all",
3939
"properties_location": "json",
40-
"model_part_name": "ThermalModelPart"
40+
"model_part_name": "ThermalModelPart",
41+
"write_mdpa_mode": "entities"
4142
},
4243
"main_launch_file": "../../exec/MainKratos.py",
4344
"examples": "examples/examples.xml"

kratos.gid/apps/Buoyancy/write/write.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ proc ::Buoyancy::write::writeModelPartEvent { } {
2020

2121
# Start Fluid write variables
2222
Fluid::write::Init
23+
# Fluid has implemented the geometry mode, but we do not use it yet in inherited apps
24+
::Fluid::write::SetAttribute write_mdpa_mode [::Buoyancy::GetWriteProperty write_mdpa_mode]
2325
# Start Fluid write conditions map from scratch
2426
Fluid::write::InitConditionsMap
2527

kratos.gid/apps/CompressibleFluid/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"materials_file": "FluidMaterials.json",
4343
"properties_location": "json",
4444
"model_part_name": "FluidModelPart",
45-
"output_model_part_name": "fluid_computational_model_part"
45+
"output_model_part_name": "fluid_computational_model_part",
46+
"write_mdpa_mode": "entities"
4647
},
4748
"main_launch_file": "python/MainKratos.py",
4849
"examples": "examples/examples.xml",

kratos.gid/apps/CompressibleFluid/write/write.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ namespace eval ::CompressibleFluid::write {
1010
proc ::CompressibleFluid::write::Init { } {
1111
# Namespace variables inicialization
1212
::Fluid::write::Init
13+
# Fluid has implemented the geometry mode, but we do not use it yet in inherited apps
14+
::Fluid::write::SetAttribute write_mdpa_mode [::CompressibleFluid::GetWriteProperty write_mdpa_mode]
1315

1416
SetAttribute parts_un [::Fluid::GetUniqueName parts]
1517
SetAttribute nodal_conditions_un [::CompressibleFluid::GetUniqueName nodal_conditions]

kratos.gid/apps/EmbeddedFluid/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"write": {
4141
"coordinates": "all",
4242
"materials_file": "FluidMaterials.json",
43-
"properties_location": "json"
43+
"properties_location": "json",
44+
"write_mdpa_mode": "entities"
4445
},
4546
"main_launch_file": "../../exec/MainKratos.py",
4647
"examples": "examples/examples.xml"

kratos.gid/apps/EmbeddedFluid/write/write.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ namespace eval ::EmbeddedFluid::write {
88
proc EmbeddedFluid::write::Init { } {
99
# Namespace variables inicialization
1010
variable writeAttributes
11+
# Fluid has implemented the geometry mode, but we do not use it yet in inherited apps
12+
::Fluid::write::SetAttribute write_mdpa_mode [::EmbeddedFluid::GetWriteProperty write_mdpa_mode]
1113
set writeAttributes [::Fluid::write::GetAttributes]
1214
}
1315

kratos.gid/apps/FSI/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"materials_file": "StructuralMaterials.json",
5454
"properties_location": "json",
5555
"model_part_name": "Structure",
56-
"enable_dynamic_substepping": false
56+
"enable_dynamic_substepping": false,
57+
"write_mdpa_mode": "entities"
5758
},
5859
"main_launch_file": "../../exec/MainKratos.py",
5960
"examples": "examples/examples.xml"

kratos.gid/apps/FSI/write/write.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ proc ::FSI::write::writeModelPartEvent { } {
2323
set filename [Kratos::GetModelName]
2424

2525
Fluid::write::Init
26+
# Fluid has implemented the geometry mode, but we do not use it yet in inherited apps
27+
::Fluid::write::SetAttribute write_mdpa_mode [::FSI::GetWriteProperty write_mdpa_mode]
2628
Fluid::write::InitConditionsMap
2729
Fluid::write::SetCoordinatesByGroups 1
2830
write::writeAppMDPA Fluid

0 commit comments

Comments
 (0)