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

[FSI] Update to time stepping #868

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions kratos.gid/apps/Common/xml/TimeParametersWithSubstepping.spd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<container n="TimeParameters" pn="Time parameters" un="TimeParameters" icon="time3" help="Problem time parameters" open_window="0">
<value n="StartTime" pn="Start time" v="0.0" help=""/>
<value n="EndTime" pn="End time" v="1.0" help=""/>
<container n="TimeStep" pn="Time Steps" icon="time1" >
<blockdata n="delta_time_interval" pn="delta time interval" name="Delta time interval 1" sequence="1" can_delete_last_item="0" icon="time2" editable_name="unique" sequence_type="non_void_disabled">
<container n="TimeStep" pn="Time Steps" icon="time1">
<blockdata n="delta_time_interval" pn="delta time interval" name="Delta time interval 1" sequence="1" can_delete_last_item="0" icon="time2" editable_name="unique" sequence_type="non_void_disabled" tree_state="open">
<value n="StartTime" pn="Start time" v="0.0" />
<value n="DeltaTime" pn="Delta time" v="0.1" />
</blockdata>
Expand Down
16 changes: 8 additions & 8 deletions kratos.gid/apps/FSI/examples/HighRiseBuilding.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ proc ::FSI::examples::HighRiseBuilding::AssignGroups2D {args} {
GiD_Groups create Structure
GiD_Groups create Ground
GiD_Groups create InterfaceStructure

GiD_EntitiesGroups assign Structure surfaces 2
GiD_EntitiesGroups assign Ground lines 12
GiD_EntitiesGroups assign InterfaceStructure lines {9 10 11}
Expand Down Expand Up @@ -91,7 +91,7 @@ proc ::FSI::examples::HighRiseBuilding::TreeAssignation {args} {
# Fluid Inlet
Fluid::xml::CreateNewInlet Inlet {new true name inlet1 ini 0 end 10.0} true "25.0*t/10.0"
Fluid::xml::CreateNewInlet Inlet {new true name inlet2 ini 10.0 end End} false 25.0

# Fluid Outlet
set fluidOutlet "$fluidConditions/condition\[@n='Outlet$nd'\]"
set outletNode [customlib::AddConditionGroupOnXPath $fluidOutlet Outlet]
Expand All @@ -115,33 +115,31 @@ proc ::FSI::examples::HighRiseBuilding::TreeAssignation {args} {
set fluidDisplacementNode [customlib::AddConditionGroupOnXPath $fluidDisplacement "FluidALEMeshBC//Total"]
$fluidDisplacementNode setAttribute ov line
set props [list selector_component_X ByValue value_component_X 0.0 selector_component_Y ByValue value_component_Y 0.0 selector_component_Z ByValue value_component_Z 0.0 Interval Total]

spdAux::SetValuesOnBaseNode $fluidDisplacementNode $props
}

# Time parameters
set parameters [list EndTime 40.0 DeltaTime 0.05]
set xpath [spdAux::getRoute "FLTimeParameters"]

spdAux::SetValuesOnBasePath $xpath $parameters

# Output
set parameters [list OutputControlType time OutputDeltaTime 1.0]
set xpath "[spdAux::getRoute FLResults]/container\[@n='GiDOutput'\]/container\[@n='GiDOptions'\]"

spdAux::SetValuesOnBasePath $xpath $parameters

# Fluid domain strategy settings
set parameters [list relative_velocity_tolerance "1e-8" absolute_velocity_tolerance "1e-10" relative_pressure_tolerance "1e-8" absolute_pressure_tolerance "1e-10" maximum_iterations "20"]
set xpath [spdAux::getRoute FLStratParams]

spdAux::SetValuesOnBasePath $xpath $parameters

# Structural
gid_groups_conds::setAttributesF {container[@n='FSI']/container[@n='Structural']/container[@n='StageInfo']/value[@n='SolutionType']} {v Dynamic}

# Structural Parts

set structParts [spdAux::getRoute "STParts"]/condition\[@n='Parts_Solid'\]
set structPartsNode [customlib::AddConditionGroupOnXPath $structParts Structure]
$structPartsNode setAttribute ov surface
Expand All @@ -161,9 +159,11 @@ proc ::FSI::examples::HighRiseBuilding::TreeAssignation {args} {
spdAux::SetValuesOnBaseNode $structDisplacementNode $props

# Structure domain time parameters
set parameters [list EndTime 40.0 DeltaTime 0.05]
set parameters [list EndTime 40.0]
set xpath [spdAux::getRoute STTimeParameters]
spdAux::SetValuesOnBasePath $xpath $parameters
set xpath "[spdAux::getRoute STTimeParameters]/container\[@n='TimeStep'\]/blockdata/value\[@n='DeltaTime'\]"
[[customlib::GetBaseRoot] selectNodes $xpath] setAttribute v 0.05

# Structural Interface
customlib::AddConditionGroupOnXPath "container\[@n='FSI'\]/container\[@n='Structural'\]/container\[@n='Loads'\]/condition\[@n='StructureInterface$nd'\]" InterfaceStructure
Expand Down
4 changes: 3 additions & 1 deletion kratos.gid/apps/FSI/examples/MokChannelWithFlexibleWall.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,11 @@ proc ::FSI::examples::MokChannelFlexibleWall::TreeAssignation {args} {
customlib::AddConditionGroupOnXPath "container\[@n='FSI'\]/container\[@n='Structural'\]/container\[@n='Loads'\]/condition\[@n='StructureInterface$nd'\]" StructureInterface

# Structure domain time parameters
set parameters [list EndTime 25.0 DeltaTime 0.1]
set parameters [list EndTime 25.0]
set xpath [spdAux::getRoute STTimeParameters]
spdAux::SetValuesOnBasePath $xpath $parameters
set xpath "[spdAux::getRoute STTimeParameters]/container\[@n='TimeStep'\]/blockdata/value\[@n='DeltaTime'\]"
[[customlib::GetBaseRoot] selectNodes $xpath] setAttribute v 0.1

# Structure domain output parameters
set parameters [list OutputControlType step]
Expand Down
4 changes: 3 additions & 1 deletion kratos.gid/apps/FSI/examples/TurekBenchmark.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,11 @@ proc ::FSI::examples::TurekBenchmark::TreeAssignation {args} {
customlib::AddConditionGroupOnXPath "container\[@n='FSI'\]/container\[@n='Structural'\]/container\[@n='Loads'\]/condition\[@n='StructureInterface$nd'\]" StructureInterface

# Structure domain time parameters
set parameters [list EndTime 20.0 DeltaTime 0.002]
set parameters [list EndTime 20.0]
set xpath [spdAux::getRoute STTimeParameters]
spdAux::SetValuesOnBasePath $xpath $parameters
set xpath "[spdAux::getRoute STTimeParameters]/container\[@n='TimeStep'\]/blockdata/value\[@n='DeltaTime'\]"
[[customlib::GetBaseRoot] selectNodes $xpath] setAttribute v 0.002

# Structure domain output parameters
set parameters [list OutputControlType time OutputDeltaTime 0.01]
Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/apps/FSI/write/writeProjectParameters.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ proc ::FSI::write::InitExternalProjectParameters { } {
# Structure section
UpdateUniqueNames Structure
apps::setActiveAppSoft Structure
Structural::write::SetAttribute time_parameters_un FLTimeParameters
# Structural::write::SetAttribute time_parameters_un FLTimeParameters
write::initWriteConfiguration [Structural::write::GetAttributes]
set FSI::write::structure_project_parameters [Structural::write::getParametersDict]

Expand Down
19 changes: 7 additions & 12 deletions kratos.gid/apps/FSI/xml/SolutionStrategyStructural.spd
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<container n="SolStratST" pn="Solution" un="STStratSection" icon="solution" help="Solution Strategy" open_window="0">

<!--<include n="Parallelism" active="1" path="apps/Common/xml/Parallelism.spd"/> -->

<dynamicnode command="spdAux::injectSolvers" args="ImplementedInApplication SolidMechanicsApplication,StructuralMechanicsApplication"/>
<container n="StratParams" pn="Strategy parameters" un="STStratParams" icon="groupsTreeNew.gif" state="normal" open_window="0">

<container n="StratParams" pn="Strategy parameters" un="STStratParams" icon="groupsTreeNew.gif" state="normal" open_window="0">
<dynamicnode command="spdAux::injectSolStratParams" args="ImplementedInApplication SolidMechanicsApplication,StructuralMechanicsApplication"/>
</container>

<container n="TimeParameters" pn="Time parameters" un="STTimeParameters" help="Problem parameters" state="[checkStateByUniqueName STSoluType Dynamic]" open_window="0">
<value n="StartTime" pn="Start time" v="0.0" help=""/>
<value n="EndTime" pn="End time" v="1.0" help=""/>
<value n="DeltaTime" pn="Delta time" v="0.01" help=""/>
<!--<value n="UseAutomaticDeltaTime" pn="Automatic Delta time" v="Fixed" values="Fixed,Automatic" help="Select the Delta time option to be used"/>-->
</container>


<include n="Time" active="1" path="apps\Common\xml\TimeParametersWithSubstepping.spd" un="STTimeParameters" state="[checkStateByUniqueName STSoluType {Quasi-static Dynamic}]"/>

</container>