From c0687ed843d51141dbd1139b04db6d2b1e108e05 Mon Sep 17 00:00:00 2001 From: Guillaume Giudicelli Date: Mon, 23 Dec 2024 00:53:58 +0100 Subject: [PATCH 1/2] Forward controllable status through the pressure action refs #29602 --- .../content/source/actions/PressureAction.md | 5 +++ .../src/actions/PressureAction.C | 34 +++++++++++++++---- .../solid_mechanics/test/tests/pressure/tests | 8 +++++ 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/modules/solid_mechanics/doc/content/source/actions/PressureAction.md b/modules/solid_mechanics/doc/content/source/actions/PressureAction.md index 92ff9f5875b7..373b6ed2240a 100644 --- a/modules/solid_mechanics/doc/content/source/actions/PressureAction.md +++ b/modules/solid_mechanics/doc/content/source/actions/PressureAction.md @@ -3,3 +3,8 @@ ## Description The `Pressure` Action is used to create a set of pressure boundary conditions for a string of displacement variables; the typical use case for this action is the application of hydrostatic pressure. See the description, example use, and parameters on the [Pressure](/Pressure/index.md) action system page. + +!alert warning +When using the [Controls system](syntax/Controls/index.md) to control the active status of Pressure boundary conditions, +the [Pressure.md] boundary conditions created by the `Pressure Action` cannot be controlled individually, +they will all follow the same enabled/disabled status. \ No newline at end of file diff --git a/modules/solid_mechanics/src/actions/PressureAction.C b/modules/solid_mechanics/src/actions/PressureAction.C index 9c01cfd892ad..216040c6b717 100644 --- a/modules/solid_mechanics/src/actions/PressureAction.C +++ b/modules/solid_mechanics/src/actions/PressureAction.C @@ -27,13 +27,6 @@ PressureAction::validParams() "displacements", "The displacements appropriate for the simulation geometry and coordinate system"); - params.addParam>( - "save_in_disp_x", {}, "The save_in variables for x displacement"); - params.addParam>( - "save_in_disp_y", {}, "The save_in variables for y displacement"); - params.addParam>( - "save_in_disp_z", {}, "The save_in variables for z displacement"); - params.addParam("factor", 1.0, "The factor to use in computing the pressure"); params.addParam("use_displaced_mesh", true, "Whether to use the displaced mesh."); params.addParam("hht_alpha", @@ -46,12 +39,31 @@ PressureAction::validParams() params.addParam("use_automatic_differentiation", false, "Flag to use automatic differentiation (AD) objects when possible"); + + // To make controlling the Pressure BCs easier + params.addParam( + "enable", + true, + "Set the enabled status of the BCs created by the Pressure action (defaults to true)."); + params.declareControllable("enable"); + + // Residual output + params.addParam>( + "save_in_disp_x", {}, "The save_in variables for x displacement"); + params.addParam>( + "save_in_disp_y", {}, "The save_in variables for y displacement"); + params.addParam>( + "save_in_disp_z", {}, "The save_in variables for z displacement"); params.addParam>("extra_vector_tags", "The extra tags for the vectors this Kernel should fill"); params.addParam>( "absolute_value_vector_tags", "The tags for the vectors this residual object should fill with the " "absolute value of the residual contribution"); + + params.addParamNamesToGroup( + "save_in_disp_x save_in_disp_y save_in_disp_z extra_vector_tags absolute_value_vector_tags", + "Residual output"); return params; } @@ -90,6 +102,14 @@ PressureAction::act() params.set("alpha") = isParamValid("alpha") ? getParam("alpha") : getParam("hht_alpha"); + // Forward control parameters + if (isParamValid("control_tags")) + params.set>("control_tags") = + getParam>("control_tags"); + // Setting a reference like this in three BCs is dangerous (the three BCs can no longer + // be controlled independently). So we only do this if "enable" is set explicitly + params.set("enable") = getParam("enable"); + params.set("variable") = displacements[i]; if (_has_save_in_vars[i]) diff --git a/modules/solid_mechanics/test/tests/pressure/tests b/modules/solid_mechanics/test/tests/pressure/tests index 016dfbb8a476..b16017eed107 100644 --- a/modules/solid_mechanics/test/tests/pressure/tests +++ b/modules/solid_mechanics/test/tests/pressure/tests @@ -17,6 +17,14 @@ design = 'syntax/BCs/Pressure/index.md' requirement = 'The Pressure boundary condition action shall create the objects needed to apply pressure boundary conditions on a 3D model as demonstrated by correctly computing the response of an elastic small-strain isotropic unit cube with pressure applied on three faces to create a hydrostatic pressure using the volumetric locking correction b-bar formulation.' [] + [controls] + type = Exodiff + input = 'pressure_control_test.i' + exodiff = 'pressure_control_test_out.e' + issues = '#29602' + design = 'syntax/BCs/Pressure/index.md' + requirement = 'The system shall be able to forward control parameters from the Pressure action to the pressure boundary conditions.' + [] [jacobian_3D_hex8] type = 'PetscJacobianTester' input = 'cantilever.i' From bb4a56bf1a330c62ac66d6eedfaab5ae13f3ddf3 Mon Sep 17 00:00:00 2001 From: Guillaume Giudicelli Date: Mon, 23 Dec 2024 01:09:15 +0100 Subject: [PATCH 2/2] Add test for controlling the pressure action --- .../pressure/gold/pressure_control_test_out.e | Bin 0 -> 77756 bytes .../tests/pressure/pressure_control_test.i | 142 ++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 modules/solid_mechanics/test/tests/pressure/gold/pressure_control_test_out.e create mode 100644 modules/solid_mechanics/test/tests/pressure/pressure_control_test.i diff --git a/modules/solid_mechanics/test/tests/pressure/gold/pressure_control_test_out.e b/modules/solid_mechanics/test/tests/pressure/gold/pressure_control_test_out.e new file mode 100644 index 0000000000000000000000000000000000000000..79e6018dcfa6a03d78a5f2f3ce737d4049812fd5 GIT binary patch literal 77756 zcmeHQ-LK@xRliF?=(k2QsJ9B6DGifEWvv{AfZTrgai*Dfs_Xxc!-qnr9c!CkrxokpTGl;d5DmR5WMjFRk`f4 zU3Pa>JDYoV+M2nxtL>jpopY*A)u~fe*Is$`XSTMs-h=;-;s3|*|I8$e{WzG0TU(Fd zcI)gsnudNh4`;lS$D{FL>W`u+@A&Rn-p9!(%;fK9a5}@Za1!z%0zD@0{k_RO@etFV zQ1AI!IM3gGze>-d5x!eV|3Hor#e}(3;CwL0@n>O*Z;BsC!#So)oQ#S5rk=KKNV{xE zyJARt){ypGp7yw+Cl;UGdN0zoG=8?8#?RK%_}O|IKU+`ZXRB$4LCQ4BM#v$G#|dul z@SgIWL^0&M^=tTl4*ws;|Hp$_x3q zEQ#W|e?Lh_;P(S!GtcBV<#2W!O(0A8gZ3ML|Hw2ril)>b=$sGY_U8vkF5dTWeGcHy zU4aq?^99vJVdHY^ee-BO;RkV0m!F)aVU{h@&>tr8JWVG4Jj~{PvY1~GPd$!jK7s#_ z3BA65kmN6u7XDWU^^mk9_528b&xU&?0Zhez@<<(|iT`mt{!93C2G7sZWTy0v&yv@C z@4d2o33}gi{S~Chch&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sT?|+OZJVWCCw!lp>#GzK%u2#_dM;rX=T<-5p5e(H+?i~1SwSG6VkRpwoKe1g`2hw zxlkS$To56YCVrXH_-5~I8!ei+q)c78lw}RD8J_G?ALf7wx^{MvXm|fNER-tuQAZ<}Fy` zDE-=i)!}N{Sh5>zEr(m>D80r%s^dC5G!FZ(ljRz1vbebP0+f_%t`>>EPL>P*wJw-- z0F7}3>+sMRN3a%!rLVJ$BUpz*<0!pt*`sdA4XW~z%(?y;cr7;AbIEeske*OPS3nVM zCsn!n*9EY1W`IjSr9Mhui6elNEu#pQ#1Xh;xlW-zyzEqcbq@Qx82ZAoZw$wT%@Sd&n|$S zaRdYJvZ+hgnnq&4Jh8BnPFQhmS(LZJ4emJSk z#_g=L(5Z6Zus=*Em+M4)y_j&T6e;`s-o@v{}~$s7C1p=VF~DOhCV zjR2dmLt}bcRlT(V;QWIaT#yUC_A|af-B`ZEi{gunbWnHMGm?@@ZV1@>SU_brV}3zD z2Hx(~&%bu{=I2-3S(fj1&ZKv#vAIoVgxNF5`l!*abE$1QXY4t(vD222Rq_L?TwZ_e z&MK22q_Fu8n{%z9wJurioKraPZX`(-D&2c|+1y7`sDvVxl@(JaIa->>Oj2#`?yR0? zGvHy_=X1$&kfuR>mN7ph4*MD#`vq_xR0U8!yHLn21+jNoY}`xNMGwUW_jStDy-SvR zA5R%~EiB?fp>z>w@gXX^Ji7=*L=$6O%3~8IR&|@$I9f=Ah>=|AOLZ_cKkT#IbIYM( zVEVWz&FJxoF{8(ojFI&lGg=)2o;A!9VMk}?KlMi-dM(aG>n9)l8+`J*fPIhnfK|yi2fhD2 z{oX%(DL)6b^IrY6Z-3|eKmNVX{Q5uV=kG50{d=Ez^VWC1@q_wPTU(!b^Y%Y|=(adt P{i83Le!unSoFV)FR@LH} literal 0 HcmV?d00001 diff --git a/modules/solid_mechanics/test/tests/pressure/pressure_control_test.i b/modules/solid_mechanics/test/tests/pressure/pressure_control_test.i new file mode 100644 index 000000000000..e9206a6081fe --- /dev/null +++ b/modules/solid_mechanics/test/tests/pressure/pressure_control_test.i @@ -0,0 +1,142 @@ +[Mesh] + type = FileMesh + file = pressure_test.e + displacements = 'disp_x disp_y disp_z' +[] + +[Functions] + [rampConstant] + type = PiecewiseLinear + x = '0. 1. 2.' + y = '0. 1. 1.' + scale_factor = 1.0 + [] + [zeroRamp] + type = PiecewiseLinear + x = '0. 1. 2.' + y = '0. 0. 1.' + scale_factor = 1.0 + [] + [rampUnramp] + type = PiecewiseLinear + x = '0. 1. 2.' + y = '0. 1. 0.' + scale_factor = 10.0 + [] +[] + +[Variables] + [disp_x] + order = FIRST + family = LAGRANGE + [] + [disp_y] + order = FIRST + family = LAGRANGE + [] + [disp_z] + order = FIRST + family = LAGRANGE + [] +[] + +[Kernels] + [SolidMechanics] + displacements = 'disp_x disp_y disp_z' + [] +[] + +[BCs] + [no_x] + type = DirichletBC + variable = disp_x + boundary = 4 + value = 0.0 + [] + [no_y] + type = DirichletBC + variable = disp_y + boundary = 5 + value = 0.0 + [] + [no_z] + type = DirichletBC + variable = disp_z + boundary = 6 + value = 0.0 + [] + [Pressure] + [Side1] + boundary = 1 + function = rampConstant + displacements = 'disp_x disp_y disp_z' + control_tags = 'tag_pressure' + [] + [Side2] + boundary = 2 + function = zeroRamp + displacements = 'disp_x disp_y disp_z' + factor = 2.0 + control_tags = 'tag_pressure' + [] + [Side3] + boundary = 3 + function = rampUnramp + displacements = 'disp_x disp_y disp_z' + control_tags = 'tag_pressure' + [] + [] +[] + +[Materials] + [Elasticity_tensor] + type = ComputeElasticityTensor + block = 1 + fill_method = symmetric_isotropic + C_ijkl = '0 0.5e6' + [] + [strain] + type = ComputeSmallStrain + displacements = 'disp_x disp_y disp_z' + block = 1 + [] + [stress] + type = ComputeLinearElasticStress + block = 1 + [] +[] + +[Controls] + # Turn Pressure on some boundaries for step 2, off at step 3 + [pressure_crank] + type = TimePeriod + enable_objects = 'BCs/Pressure/Side1' + disable_objects = 'BCs/Pressure/Side2 BCs/Pressure/Side3' + start_time = 1 + end_time = 2 + # All Pressure are controlled outside of the period as well + reverse_on_false = true + [] +[] + +[Executioner] + type = Transient + solve_type = PJFNK + nl_abs_tol = 1e-10 + l_max_its = 20 + start_time = 0.0 + dt = 1.0 + num_steps = 3 + end_time = 2.0 +[] + +[Outputs] + [out] + type = Exodus + elemental_as_nodal = true + [] + [controls] + type = ControlOutput + show_active_objects = false + [] +[]