Skip to content

Commit 3fcbc86

Browse files
committed
first implementation
1 parent 317e7e4 commit 3fcbc86

2 files changed

Lines changed: 53 additions & 5 deletions

File tree

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

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ proc PfemFluid::write::getNewParametersDict { } {
2929
set processList [GetPFEM_ProcessList]
3030
dict set projectParametersDict processes $processList
3131

32-
##### Restart
33-
# set output_process_list [GetPFEM_OutputProcessList]
34-
# dict set projectParametersDict output_process_list $output_process_list
32+
##### WaveMonitor, Restart
33+
set output_processes_list [GetPFEM_OutputProcesses]
34+
dict set projectParametersDict output_processes $output_processes_list
3535

3636
##### output_configuration
3737
# dict set projectParametersDict output_configuration [write::GetDefaultOutputDict]
@@ -157,11 +157,52 @@ proc PfemFluid::write::GetPFEM_SolverSettingsDict { } {
157157
return $solverSettingsDict
158158
}
159159

160+
proc PfemFluid::write::GetPFEM_OutputProcesses { } {
161+
set resultList [dict create]
162+
163+
set output_process_list [GetPFEM_OutputProcessList]
164+
dict set resultList output_list $output_process_list
165+
166+
return $resultList
167+
}
168+
169+
160170
proc PfemFluid::write::GetPFEM_OutputProcessList { } {
171+
161172
set resultList [list]
173+
dict set resultList "python_module" "wave_height_output_process"
174+
dict set resultList "kratos_module" "KratosMultiphysics.PfemFluidDynamicsApplication"
175+
176+
set parametersWave [GetPFEM_OutputParameters]
177+
dict set resultList Parameters $parametersWave
178+
162179
# lappend resultList [write::GetRestartProcess Restart]
163180
return $resultList
164181
}
182+
183+
184+
proc PfemFluid::write::GetPFEM_OutputParameters { } {
185+
186+
set parametersWave [dict create]
187+
dict set parametersWave "model_part_name" "PfemFluidModelPart"
188+
dict set parametersWave "coordinates" [write::getValue WaveMonitor Coordinates]
189+
190+
set WaveCalculationSetting [dict create]
191+
dict set WaveCalculationSetting "mean_water_level" [write::getValue WaveMonitor MeanWaterLevel]
192+
dict set WaveCalculationSetting "relative_search_radius" [write::getValue WaveMonitor RelativeSearchRadius]
193+
dict set parametersWave wave_calculation_settings $WaveCalculationSetting
194+
195+
set OutputFileSettings [dict create]
196+
dict set OutputFileSettings "file_name" "pfem_<i>"
197+
dict set OutputFileSettings "output_path" "gauges"
198+
dict set parametersWave output_file_settings $OutputFileSettings
199+
200+
dict set parametersWave "time_between_outputs" [write::getValue WaveMonitor TimeBetweenOutputs]
201+
202+
return $parametersWave
203+
}
204+
205+
165206
proc PfemFluid::write::GetPFEM_ProblemProcessList { free_surface_heat_flux free_surface_thermal_face } {
166207
set resultList [list ]
167208
set problemtype [write::getValue PFEMFLUID_DomainType]

kratos.gid/apps/PfemFluid/xml/Results.spd

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99
<value n="BodyOutput" pn="Body output" v="Yes" values="Yes,No" help="The interior of the volume is printed" icon="data"/>
1010
<value n="NodeOutput" pn="Node output" v="Yes" values="Yes,No" help="The nodes are printed as a separate layer" icon="data"/>
1111
<value n="SkinOutput" pn="Skin output" v="No" values="Yes,No" help="" state="hidden" icon="data"/>
12-
<container n="OnElement" pn="On element" un="ElementResults" icon="select" help="Activate the results you want to see in the elements" open_window="0">
12+
<container n="WaveMonitor" pn="Wave Monitor" un="WaveMonitor" icon="select" help="Activate the results you want to set wave gauges" open_window="0">
13+
<value n="UseWaveMonitor" pn="Add Wave Gauges" type="bool" values="true,false" v="false" icon="data" />
14+
<value n="Coordinates" pn="Coordinates" icon="data" fieldtype="vector" dimensions="3" format="%.6g" v="0.0,0.0,0.0" state="[getStateFromXPathValue {string(../value[@n='UseWaveMonitor']/@v)} true]" help="Coordinates of the wave gauges"/>
15+
<value n="MeanWaterLevel" pn="Mean Level" icon="data" v="0" state="[getStateFromXPathValue {string(../value[@n='UseWaveMonitor']/@v)} true]" help="Water Level"/>
16+
<value n="RelativeSearchRadius" pn="Relative Search Radius" icon="data" v="2" state="[getStateFromXPathValue {string(../value[@n='UseWaveMonitor']/@v)} true]" help="Relative versus element size"/>
17+
<value n="TimeBetweenOutputs" pn="Output Time" icon="data" v="0.01" state="[getStateFromXPathValue {string(../value[@n='UseWaveMonitor']/@v)} true]" help="Time between following measures"/>
18+
</container>
19+
<container n="OnElement" pn="Elemental Results" un="ElementResults" icon="select" help="Activate the results you want to see in the elements" open_window="0">
1320
<!--<dynamicnode command="spdAux::injectElementOutputs" args=""/>-->
1421
<!--<dynamicnode command="spdAux::injectConstitutiveLawOutputs" args=""/>-->
1522
<value n="CAUCHY_STRESS_VECTOR" pn="Cauchy stress vector" v="No" values="Yes,No"/>
1623
<value n="YIELDED" pn="Yielded" v="No" values="Yes,No"/>
1724
</container>
18-
<container n="OnNodes" pn="On nodes" un="NodalResults" icon="select" help="Activate the results you want to see in the nodes" open_window="0">
25+
<container n="OnNodes" pn="Nodal Results" un="NodalResults" icon="select" help="Activate the results you want to see in the nodes" open_window="0">
1926
<value n="PARTITION_INDEX" pn="Partition index" v="Yes" values="Yes,No" help="" state="[checkStateByUniqueName ParallelType MPI]"/>
2027
<dynamicnode command="spdAux::injectNodalConditionsOutputs" args=""/>
2128
<!--<value n="ACCELERATION" pn="Acceleration" v="No" values="Yes,No" state="[checkStateByUniqueName PFEMFLUID_DomainType Fluids]"/>-->

0 commit comments

Comments
 (0)