Skip to content

Commit 9dcde3c

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 4e1782a + 6e48e96 commit 9dcde3c

178 files changed

Lines changed: 6261 additions & 2430 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
*.lnk
33

44
# Kratos execution folder
5-
kratos.gid/exec/*
6-
!kratos.gid/exec/README.md
5+
kratos.gid/exec/Kratos*
6+
# !kratos.gid/exec/README.md
7+
!kratos.gid/exec/MainKratos.py
78
*.orig
89
.vscode/
910

1011
custom_tools/*
1112
.DS_Store
13+
14+
*.zip
15+
*.tgz

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ If you need the developer version, you are on the right place.
2323
### Step by step video
2424
https://www.youtube.com/watch?v=zZq7ypDdudo
2525

26+
## Launch modea
27+
In Kratos preferences, select the execution mode:
28+
* Pip packages: Kratos will be installed via `pip install`
29+
* local compiled: If you are a developer and build your applications, use this one
30+
* docker: If you do not want to install any dependency, just run via docker!
31+
* The default image is [fjgarate/kratos-run](https://hub.docker.com/repository/docker/fjgarate/kratos-run)
32+
2633
## Usage
2734
* Run GiD
2835
* Go to: Data / Problem type / kratos

dockers/dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:3.9
2+
3+
RUN pip install KratosMultiphysics-all numpy
4+
WORKDIR "/model"
5+
RUN chmod 777 /model
6+
ENTRYPOINT [ "python3", "MainKratos.py" ]
7+
8+
# docker build --tag="kratos-run:latest" -t kratos-run .
9+
# docker tag kratos-run:latest fjgarate/kratos-run:latest
10+
# docker push fjgarate/kratos-run:0.0.1

kratos.gid/apps/Buoyancy/app.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
"prefix": "Buoyancy_",
55
"themed": false,
66
"kratos_name": "Buoyancyapplication",
7+
"python_packages": [
8+
"KratosFluidDynamicsApplication",
9+
"KratosConvectionDiffusionApplication"
10+
],
711
"dimensions": [
812
"2D",
913
"3D"
@@ -16,10 +20,13 @@
1620
"write/write.tcl",
1721
"write/writeProjectParameters.tcl"
1822
],
19-
"start_script":"::Buoyancy::Init",
20-
"requeriments":{
21-
"apps":["Fluid", "ConvectionDiffusion"],
22-
"minimum_gid_version":"15.1.3d"
23+
"start_script": "::Buoyancy::Init",
24+
"requeriments": {
25+
"apps": [
26+
"Fluid",
27+
"ConvectionDiffusion"
28+
],
29+
"minimum_gid_version": "15.1.3d"
2330
},
2431
"permissions": {
2532
"open_tree": true,
@@ -32,6 +39,6 @@
3239
"properties_location": "json",
3340
"model_part_name": "ThermalModelPart"
3441
},
35-
"main_launch_file": "python/MainKratos.py",
42+
"main_launch_file": "../../exec/MainKratos.py",
3643
"examples": "examples/examples.xml"
37-
}
44+
}

kratos.gid/apps/Buoyancy/python/KratosFluid.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

kratos.gid/apps/Buoyancy/python/MainKratos.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace eval ::Buoyancy::write {
22
namespace path ::Buoyancy::write
33
Kratos::AddNamespace [namespace current]
4-
4+
55
variable writeAttributes
66
}
77

@@ -54,7 +54,7 @@ proc ::Buoyancy::write::writeModelPartEvent { } {
5454
proc ::Buoyancy::write::writeCustomFilesEvent { } {
5555
# Materials
5656
Buoyancy::write::WriteMaterialsFile True
57-
write::SetConfigurationAttribute main_launch_file [GetAttribute main_launch_file]
57+
write::SetConfigurationAttribute main_launch_file [ConvectionDiffusion::write::GetAttribute main_launch_file]
5858
}
5959

6060
proc ::Buoyancy::write::Validate {} {
@@ -65,7 +65,7 @@ proc ::Buoyancy::write::Validate {} {
6565
proc ::Buoyancy::write::WriteMaterialsFile {{write_const_law True} {include_modelpart_name True} } {
6666
# Note: This will generate 2 quasi identical files for materials. The difference is the model_part_name
6767

68-
# Write fluid material file
68+
# Write fluid material file
6969
Fluid::write::WriteMaterialsFile $write_const_law $include_modelpart_name
7070

7171
# Write Buoyancy materials file

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
proc ::Buoyancy::write::getParametersDict { } {
33
set projectParametersDict [dict create]
44

5+
# Analysis stage field
6+
dict set projectParametersDict analysis_stage "KratosMultiphysics.ConvectionDiffusionApplication.convection_diffusion_analysis"
7+
58
# problem data
69
dict set projectParametersDict problem_data [::Buoyancy::write::GetProblemData_Dict]
710

kratos.gid/apps/Buoyancy/xml/ConstitutiveLaws.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<ConstitutiveLaws>
33
<!--Newtonian constitutive laws-->
4-
<CLaw n="Newtonian2DLaw" pn="Newtonian" ProductionReady="ProductionReady" help="Newtonian fluid" App="Fluid" ElementCompressibility="Incompressible" ImplementedInApplication="FluidDynamicsApplication" Dimension="2D">
4+
<CLaw n="Newtonian2DLaw" pn="Newtonian" help="Newtonian fluid" App="Fluid" ElementCompressibility="Incompressible" ImplementedInApplication="FluidDynamicsApplication" Dimension="2D">
55
<inputs>
66
<parameter n="DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="1.225"/>
77
<parameter n="DYNAMIC_VISCOSITY" pn="Dynamic viscosity" unit_magnitude="M/(L*T)" units="kg/(m*s)" v="1.846e-5" help="Set the dynamic viscosity."/>
@@ -12,7 +12,7 @@
1212
</outputs>
1313
</CLaw>
1414

15-
<CLaw n="Newtonian3DLaw" pn="Newtonian" ProductionReady="ProductionReady" help="Newtonian fluid" App="Fluid" ElementCompressibility="Incompressible" ImplementedInApplication="FluidDynamicsApplication" Dimension="3D">
15+
<CLaw n="Newtonian3DLaw" pn="Newtonian" help="Newtonian fluid" App="Fluid" ElementCompressibility="Incompressible" ImplementedInApplication="FluidDynamicsApplication" Dimension="3D">
1616
<inputs>
1717
<parameter n="DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="1.225"/>
1818
<parameter n="DYNAMIC_VISCOSITY" pn="Dynamic viscosity" unit_magnitude="M/(L*T)" units="kg/(m*s)" v="1.846e-5" help="Set the dynamic viscosity."/>
@@ -24,7 +24,7 @@
2424
</CLaw>
2525

2626
<!--Newtonian with sound velocity constitutive laws-->
27-
<CLaw n="WeaklyCompressibleNewtonian2DLaw" pn="Newtonian" ProductionReady="ProductionReady" help="Newtonian fluid with sound velocity for weak compressibility" App="Fluid" ElementCompressibility="WeaklyCompressible" ImplementedInApplication="FluidDynamicsApplication" Dimension="2D" KratosName="Newtonian2DLaw">
27+
<CLaw n="WeaklyCompressibleNewtonian2DLaw" pn="Newtonian" help="Newtonian fluid with sound velocity for weak compressibility" App="Fluid" ElementCompressibility="WeaklyCompressible" ImplementedInApplication="FluidDynamicsApplication" Dimension="2D" KratosName="Newtonian2DLaw">
2828
<inputs>
2929
<parameter n="DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="1.225"/>
3030
<parameter n="DYNAMIC_VISCOSITY" pn="Dynamic viscosity" unit_magnitude="M/(L*T)" units="kg/(m*s)" v="1.846e-5" help="Set the dynamic viscosity."/>
@@ -36,7 +36,7 @@
3636
</outputs>
3737
</CLaw>
3838

39-
<CLaw n="WeaklyCompressibleNewtonian3DLaw" pn="Newtonian" ProductionReady="ProductionReady" help="Newtonian fluid with sound velocity for weak compressibility" App="Fluid" ElementCompressibility="WeaklyCompressible" ImplementedInApplication="FluidDynamicsApplication" Dimension="3D" KratosName="Newtonian3DLaw">
39+
<CLaw n="WeaklyCompressibleNewtonian3DLaw" pn="Newtonian" help="Newtonian fluid with sound velocity for weak compressibility" App="Fluid" ElementCompressibility="WeaklyCompressible" ImplementedInApplication="FluidDynamicsApplication" Dimension="3D" KratosName="Newtonian3DLaw">
4040
<inputs>
4141
<parameter n="DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="1.225"/>
4242
<parameter n="DYNAMIC_VISCOSITY" pn="Dynamic viscosity" unit_magnitude="M/(L*T)" units="kg/(m*s)" v="1.846e-5" help="Set the dynamic viscosity."/>

kratos.gid/apps/CDEM/app.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"name": "CDEM",
44
"prefix": "DEM",
55
"themed": false,
6-
"kratos_name": "DEMapplication",
6+
"kratos_name": "DEMApplication",
7+
"python_packages": [
8+
"KratosDEMApplication","numpy"
9+
],
710
"dimensions": [
811
"2D",
912
"3D"
@@ -21,10 +24,12 @@
2124
"xml/XmlController.tcl",
2225
"xml/BulkGroup.tcl"
2326
],
24-
"start_script":"::CDEM::Init",
25-
"requeriments":{
26-
"apps":["DEM"],
27-
"minimum_gid_version":"15.1.3d"
27+
"start_script": "::CDEM::Init",
28+
"requeriments": {
29+
"apps": [
30+
"DEM"
31+
],
32+
"minimum_gid_version": "15.1.3d"
2833
},
2934
"permissions": {
3035
"open_tree": true,
@@ -34,4 +39,4 @@
3439
},
3540
"main_launch_file": "python/MainKratos.py",
3641
"examples": "examples/examples.xml"
37-
}
42+
}

0 commit comments

Comments
 (0)