Skip to content

Commit

Permalink
fluid condition names
Browse files Browse the repository at this point in the history
  • Loading branch information
jginternational committed Oct 2, 2023
1 parent d43faf6 commit f846eac
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
8 changes: 4 additions & 4 deletions kratos.gid/apps/Fluid/xml/Conditions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ConditionList>
<ConditionItem n="AutomaticInlet2D" pn="Automatic inlet velocity" ImplementedInFile=".cpp" Interval="Total" ImplementedInApplication="FluidApplication" MinimumKratosVersion="9000" WorkingSpaceDimension="2D" LocalSpaceDimension="1" SkinConditions="True" VariableName="VELOCITY" App="Fluid" ElementType="Line" ProcessName="ApplyInletProcess" help="" units="m/s" unit_magnitude="Velocity">
<TopologyFeatures>
<item GeometryType="Line" nodes="2" KratosName="WallCondition2D2N"/>
<item GeometryType="Line" nodes="2" KratosName="LineCondition2D2N"/>
</TopologyFeatures>
<DegreesOfFreedom></DegreesOfFreedom>
<inputs></inputs>
Expand All @@ -18,7 +18,7 @@
</ConditionItem>
<ConditionItem n="Outlet2D" pn="Outlet pressure" ImplementedInFile=".cpp" Interval="False" ImplementedInApplication="FluidApplication" MinimumKratosVersion="9000" WorkingSpaceDimension="2D" LocalSpaceDimension="1" SkinConditions="True" VariableName="PRESSURE" App="Fluid" ElementType="Line" ProcessName="ApplyOutletProcess" help="Fixes the pressure" units="Pa" unit_magnitude="P">
<TopologyFeatures>
<item GeometryType="Line" nodes="2" KratosName="WallCondition2D2N"/>
<item GeometryType="Line" nodes="2" KratosName="LineCondition2D2N"/>
</TopologyFeatures>
<DegreesOfFreedom></DegreesOfFreedom>
<inputs></inputs>
Expand All @@ -40,7 +40,7 @@
</ConditionItem>
<ConditionItem n="Slip2D" pn="Slip" ImplementedInFile=".cpp" Interval="False" ImplementedInApplication="FluidApplication" MinimumKratosVersion="9000" WorkingSpaceDimension="2D" LocalSpaceDimension="1" SkinConditions="True" App="Fluid" ElementType="Line" ProcessName="ApplySlipProcess" help="" GroupBy="Condition">
<TopologyFeatures>
<item GeometryType="Line" nodes="2" KratosName="WallCondition2D2N"/>
<item GeometryType="Line" nodes="2" KratosName="LineCondition2D2N"/>
</TopologyFeatures>
<DegreesOfFreedom></DegreesOfFreedom>
<inputs></inputs>
Expand All @@ -56,7 +56,7 @@
</ConditionItem>
<ConditionItem n="NoSlip2D" pn="No Slip" ImplementedInFile=".cpp" Interval="False" ImplementedInApplication="FluidApplication" MinimumKratosVersion="9000" WorkingSpaceDimension="2D" LocalSpaceDimension="1" SkinConditions="True" App="Fluid" ElementType="Line" ProcessName="ApplyNoSlipProcess" help="">
<TopologyFeatures>
<item GeometryType="Line" nodes="2" KratosName="WallCondition2D2N"/>
<item GeometryType="Line" nodes="2" KratosName="LineCondition2D2N"/>
</TopologyFeatures>
<DegreesOfFreedom></DegreesOfFreedom>
<inputs></inputs>
Expand Down
1 change: 1 addition & 0 deletions kratos.gid/exec/compiled.unix.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fi

# Prevents the PYTHONHOME error from happening and isolate possible python repacks present
# in the system and interfeering with runkratos
export PYTHONHOME=""
export PYTHONPATH=$kratos_bin_path:$PYTHONPATH

KERNEL_NAME="linux"
Expand Down
11 changes: 10 additions & 1 deletion kratos.gid/exec/compiled.win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@ DEL "%2\vtk_output"

@REM echo "Launching on Compiled for windows -> %kratos_bin_path%" > .run


set PATH=E:\Deploy_Deltares\libs;%PATH%
set PYTHONPATH=E:\Deploy_Deltares
set PYTHONHOME=C:\Users\garat\AppData\Local\Programs\Python\Python311


set PATH=%kratos_bin_path%\libs;%PATH%
set PYTHONPATH=%kratos_bin_path%
REM pythonhome is the parent directory of %python_path%

set PYTHONHOME=""
%python_path% -c "import os; print (os.environ)" > "%2\\%1.1info" 2> "%2\\%1.1err"
REM Run Python using the script MainKratos.py
%python_path%/python MainKratos.py > "%2\\%1.info" 2> "%2\\%1.err"
%python_path% MainKratos.py > "%2\\%1.info" 2> "%2\\%1.err"
5 changes: 3 additions & 2 deletions kratos.gid/exec/pip.win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ DEL "%2\%1.err"
DEL "%2\%1*.post.bin"
DEL "%2\%1*.post.res"
DEL "%2\%1*.post.msh"

@REM Calculate!
%kratos_python_exe% MainKratos.py > "%2\\%1.info" 2> "%2\\%1.err"

set PYTHONHOME=""
%python_path% MainKratos.py > "%2\\%1.info" 2> "%2\\%1.err"
7 changes: 3 additions & 4 deletions kratos.gid/scripts/Launch.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,11 @@ proc Kratos::pipVersion { {pythonExecutable ""} } {
}
set ver 0

catch {
set info [exec $pip -m pip --version 2>@1]
if {[regexp {pip\s+(\d+\.\d+)} $info --> version]} {
set ver $version
}
}


return $ver
}
Expand Down Expand Up @@ -206,7 +205,7 @@ proc Kratos::CheckDependenciesPipMode {} {
if {$py_version <= 0} {
set ret "MISSING_PYTHON"
} else {
set pip_version [Kratos::pipVersion]
set pip_version [Kratos::pipVersion $python_exe_path]
if {$pip_version <= 0} {
set ret "MISSING_PIP"
} else {
Expand Down Expand Up @@ -360,4 +359,4 @@ proc Kratos::CreateModeCombo { } {

grid $w -col 9 -row 0 -padx 10 -sticky news

}
}

0 comments on commit f846eac

Please sign in to comment.