36 this->
Set(Alpha, N, ThetaS, ThetaR, Ks);
62 int numbersol = data.
sol.
size();
67 const STATE sol = data.
sol[0][0];
82 const int phr = phi.
Rows();
85 for(i = 0; i < phr; i++){
86 const STATE BetaBarGradV = BetaBarT*dphi(1,i);
87 ef(i,0) += -1.*weight *( -1.*sol*dphi(1,i) +1.*dsol(1,0)*BetaBarGradV + (dsol(0,0))*dphi(0,i));
88 for(j = 0; j < phr; j++){
89 ek(i,j) += weight * ( -1.*phi(j,0)*dphi(1,i)+dphi(1,j)*BetaBarGradV + dphi(0,i)*dphi(0,j) );
96 const STATE v2 = bc.
Val2()(0,0);
98 const int phr = phi.
Rows();
100 int numbersol = data.
sol.
size();
101 if (numbersol != 1) {
110 for(in = 0 ; in < phr; in++) {
111 ef(in,0) += weight * (
gBigNumber * phi(in,0) * (v2 - data.
sol[0][0]) );
112 for (jn = 0 ; jn < phr; jn++) {
113 ek(in,jn) +=
gBigNumber * phi(in,0) * phi(jn,0) * weight;
128 const STATE sol = data.
sol[0][0];
129 STATE ConvDir[2] = {0., 1.};
131 normal[0] = data.
axes(0,1);
132 normal[1] = -1.*data.
axes(0,0);
134 STATE ConvNormal = ConvDir[0]*normal[0] + ConvDir[1]*normal[1];
135 if(ConvNormal > 0.) {
136 for(
int il = 0; il < phr; il++) {
137 for(
int jl = 0; jl < phr; jl++) {
138 ek(il,jl) += weight * ConvNormal * phi(il)*phi(jl);
140 ef(il,0) += -1. * weight * ConvNormal * phi(il) * sol;
144 if (ConvNormal < 0.) std::cout <<
"Boundary condition error: inflow detected in outflow boundary condition: ConvNormal = " << ConvNormal <<
"\n";
150 std::cout << __PRETTY_FUNCTION__ <<
" at line " << __LINE__ <<
" not implemented\n";
164 STATE result = (m*n*
pow(
pow(a,(STATE)2.)*
pow(sol,(STATE)2.),n/2.)*
pow(1./(1. +
pow(
pow(a,(STATE)2.)*
pow(sol,(STATE)2.),n/2.)),1. + m)*(TR - TS))/sol;
182 if(
fabs(A) < tol)
return 0;
183 if(A > 0.)
return +1;
189 STATE antes = this->
C_Coef(sol1);
191 STATE depois = this->
C_Coef(sol2);
192 STATE result = (depois-antes)/(sol2-sol1);
199 double delta = (solL - sol0)/(np-1);
201 for(
int i = 0; i < np; i++){
204 C(i,1) = this->
C_Coef(sol);
206 K(i,1) = this->
K_Coef(sol);
208 dCdSol(i,1) = this->
DCDsol(sol);
210 dKdsol(i,1) = this->
DKDsol(sol);
213 std::ofstream file(filename);
228 STATE
Se = this->
Se(sol);
229 STATE Ks = this->
fKs;
230 STATE result = Ks*
sqrt(Se)*
pow(((STATE)1.)-
pow(((STATE)1.)-
pow(Se,((STATE)1.)/m),m),(STATE)2.);
239 STATE antes = this->
K_Coef(sol1);
241 STATE depois = this->
K_Coef(sol2);
242 STATE resposta = (depois-antes)/(sol2-sol1);
248 STATE
Se = this->
Se(sol);
249 STATE DkDSe = 0.5 * this->
fKs * (1.-
pow(((STATE)1.)-
pow(Se,((STATE)1.)/m),m))*(4.*
pow(Se,((STATE)-0.5)+(((STATE)1.)/m))*
pow(((STATE)1.)-
pow(Se,((STATE)1.)/m),m-((STATE)1.))-(-1.+
pow(((STATE)1.)-
pow(Se,((STATE)1.)/m),m))/
sqrt(Se));
251 STATE dkdsol = DkDSe * DSeDsol;
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
static STATE TCoeff
Inicializing local variable TCoeff.
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
void AnalysisOfParameters(STATE sol0, STATE solL, char *filename)
clarg::argBool bc("-bc", "binary checkpoints", false)
~TPZSpaceTimeRichardsEq()
static STATE deltaDerivada
Inicializing loval variable deltaDerivada.
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
STATE K_Coef(STATE sol)
Computes coeficient K(sol) based on current solution sol.
TPZFMatrix< STATE > & Val2(int loadcase=0)
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
Contains the TPZSpaceTimeRichardsEq class which implements a 1D space-time Richards' equation...
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
This abstract class defines the behaviour which each derived class needs to implement.
STATE Theta(STATE Se)
Computes Theta coefficient from Se coefficient.
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
virtual int NStateVariables() const override
It returns the number of state variables associated with the material.
int64_t size() const
Returns the number of elements of the vector.
virtual int ClassId() const override
Define the class id associated with the class.
#define DebugStop()
Returns a message to user put a breakpoint in.
This class defines the boundary condition for TPZMaterial objects.
static STATE LCoeff
Inicializing local variable LCoeff.
int64_t Rows() const
Returns number of rows.
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
It computes a contribution to the stiffness matrix and load vector at one integration point...
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
virtual int Dimension() const override
It returns the integrable dimension of the material.
static REAL gBigNumber
Big number to penalization method, used for Dirichlet conditions.
void Set(STATE Alpha, STATE N, STATE ThetaS, STATE ThetaR, STATE Ks)
int32_t Hash(std::string str)
int ClassId() const override
Unique identifier for serialization purposes.
int Sign(double A, double tol)
Return sign of the STATE A. If A is closed to zero up to tolerance tol returns zero (in absolute valu...
TPZFlopCounter pow(const TPZFlopCounter &orig, const TPZFlopCounter &xp)
Returns the power and increments the counter of the power.
Implemenents a 1D space-time Richards' equation.
STATE Se(STATE sol)
Computes Se coeficient which allows the computation of K and Theta coefficients.
virtual void Print(std::ostream &out) const
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
clarg::argString m("-m", "input matrix file name (text format)", "matrix.txt")
STATE C_Coef(STATE sol)
Computes coeficient C(sol) based on current solution sol.
STATE fAlpha
Soil parameters.
TPZSolVec sol
vector of the solutions at the integration point
REAL detjac
determinant of the jacobian
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...