https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CircularAreaHydraulicDiameterFunctionTest.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MooseObjectUnitTest.h"
13#include "Function.h"
14
16{
17public:
19 : MooseObjectUnitTest("ThermalHydraulicsApp"), _Dh_name("Dh_fn")
20 {
22 }
23
24protected:
26 {
27 // area
28 const std::string A_name = "A_fn";
29 {
30 const std::string class_name = "ParsedFunction";
31 InputParameters params = _factory.getValidParams(class_name);
32 params.set<std::string>("expression") = "1 + x";
33 _fe_problem->addFunction(class_name, A_name, params);
34 }
35
36 Function & A_fn = _fe_problem->getFunction(A_name);
37 A_fn.initialSetup();
38
39 // hydraulic diameter
40 {
41 const std::string class_name = "CircularAreaHydraulicDiameterFunction";
42 const std::string Dh_name = "Dh_fn";
43 InputParameters params = _factory.getValidParams(class_name);
44 params.set<FunctionName>("area_function") = A_name;
45 _fe_problem->addFunction(class_name, Dh_name, params);
46 }
47 }
48
49 const FunctionName _Dh_name;
50};
InputParameters getValidParams(const std::string &name) const
T & set(const std::string &name, bool quiet_mode=false)
std::shared_ptr< FEProblem > _fe_problem
virtual void initialSetup()