Commit bf845bb6 authored by thomaskummer's avatar thomaskummer
Browse files

cervin lifev update

parent 04f8041b
......@@ -386,8 +386,8 @@ int main (int argc, char** argv)
patchForceVecPtr.push_back ( heartSolver.directionalVectorField(FESpace, patchForceDirection[i], 1e-10) );
patchForceBCVecPtr.push_back ( bcVectorPtr_Type( new bcVector_Type( *patchForceVecPtr[i], solver.structuralOperatorPtr() -> dispFESpacePtr() -> dof().numTotalDof(), 1 ) ) );
solver.bcInterfacePtr() -> handler()->addBC (patchName, (800+i), Natural, Component, *patchForceBCVecPtr[i], patchComponent);
//solver.bcInterfacePtr() -> handler()->addBC (patchName, (800+i), Natural, Full, *patchForceBCVecPtr[i], 3);
//solver.bcInterfacePtr() -> handler()->addBC (patchName, (800+i), Natural, Component, *patchForceBCVecPtr[i], patchComponent);
solver.bcInterfacePtr() -> handler()->addBC (patchName, (800+i), Natural, Full, *patchForceBCVecPtr[i], 3);
}
auto modifyNaturalPatchBC = [&] (const Real& time)
......@@ -608,14 +608,14 @@ int main (int argc, char** argv)
}
// Update pressure b.c.
modifyPressureBC(preloadPressure(bcValues, i, preloadSteps));
//modifyNaturalPatchBC(i);
//modifyPressureBC(preloadPressure(bcValues, i, preloadSteps));
modifyNaturalPatchBC(i);
// Solve mechanics
solver.bcInterfacePtr() -> updatePhysicalSolverVariables();
solver.solveMechanics();
//solver.saveSolution (i-1);
solver.saveSolution (i-1);
}
auto maxI4fValue ( solver.activationModelPtr()->I4f().maxValue() );
......
......@@ -210,11 +210,12 @@ public:
return ( coords && time ? 30 : 0 );
}
Real sinSquared (const Real& t, const Real& Tmax, const Real& tmax, const Real& tduration)
Real sinSquared (const Real& time, const Real& Tmax, const Real& tmax, const Real& tduration)
{
bool time ( fmod(t-tmax+0.5*tduration, 800.) < tduration && fmod(t-tmax+0.5*tduration, 800.) > 0);
Real force = std::pow( std::sin(fmod(t-tmax+0.5*tduration, 800.)*3.14159265359/tduration) , 2 ) * Tmax;
return ( time ? force : 0 );
Real timeInPeriod = fmod(t-tmax+0.5*tduration, 800.);
bool inPeriod ( timeInPeriod < tduration && timeInPeriod > 0);
Real sinusSquared = std::pow( std::sin(timeInPeriod*3.14159265359/tduration) , 2 ) * Tmax;
return ( inPeriod ? sinusSquared : 0 );
}
template<class bcVectorType>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment