https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ObtainAvgContactAngle.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://www.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
11
12#include "libmesh/quadrature.h"
13
15
18{
20 params.addClassDescription("Obtain contact angle");
21 params.addRequiredCoupledVar("pf", "phase field variable");
22 return params;
23}
24
26 : SidePostprocessor(parameters), _pf(coupledValue("pf")), _grad_pf(coupledGradient("pf"))
27{
28}
29
30void
36
37void
39{
40
41 for (unsigned int qp = 0; qp < _qrule->n_points(); qp++)
42 {
43 if (std::abs(_pf[qp]) < 0.5) // Operating only within the interface
44 {
45 // Real tol_val = libMesh::TOLERANCE * libMesh::TOLERANCE;
46 const Real weight = _grad_pf[qp].norm();
48 _grad_pf[qp] * _normals[qp]; // weight * (_grad_pf[qp]/_grad_pf[qp].norm()) * _normals[qp]
49 _total_weight += weight;
50 }
51 }
52}
53
54Real
59
60void
67
68void
const std::vector< double > y
registerMooseObject("PhaseFieldApp", ObtainAvgContactAngle)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
This postprocessor computes displacements normal to a provided set of boundaries.
virtual void execute() override
virtual void initialize() override
virtual void finalize() override
const VariableValue & _pf
Gradient of coupled variable.
const VariableGradient & _grad_pf
Gradient of coupled variable.
Real _contact_angle
Average contact angle.
Real _cos_theta_val
cos theta value
virtual Real getValue() const override
static InputParameters validParams()
virtual void threadJoin(const UserObject &y) override
ObtainAvgContactAngle(const InputParameters &parameters)
static InputParameters validParams()
const QBase *const & _qrule
const MooseArray< Point > & _normals
void gatherSum(T &value)
const Real pi