View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003302 | OpenFOAM | Bug | public | 2019-07-03 15:57 | 2019-07-04 14:33 |
Reporter | jkau | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 14.04 |
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0003302: verticalDamping crashes since introduction of isotropicDamping | ||||
Description | Using verticalDamping in e.g. the DTCHullMoving tutorial causes the solver to crash . This happens since commit 251f91cfa568881fccde70ae9eb6ccba8d784ed0 ("fvOptions::isotropicDamping: New wave damping fvOption"). | ||||
Steps To Reproduce | include verticalDamping in DTCHullMoving tutorial: option1 { type verticalDamping; selectionMode all; origin (-3 0 0); direction (-1 0 0); scale { type quadraticRamp; start 0; duration 6; } lambda 22; timeStart 0; duration 1e6; } | ||||
Additional Information | What is noticeable, that the cell volumne is not accouted for anymore in the calculation of the damping force. In previous version this was: force[i] = V[c]*s[c](lgg.value() & alphaRhoU[c]); with V being the cell volumes. | ||||
Tags | No tags attached. | ||||
|
> What is noticeable, that the cell volumne is not accouted for anymore in the calculation of the damping force Are you sure? In eqn -= forceCoeff()*(gg & alphaRhoU()); the volume should be accounted for in the "-=" operator. |
|
I checked the matrix generated by the verticalDamping functionObject for the tutorials/multiphase/interFoam/laminar/wave case in OpenFOAM-6 and OpenFOAM-dev and they are identical. |
|
Yes, you are right. However, I did some more testing, the different behaviour only arises when using multiple zones, i.e. list of originis and directions. The forceCoeff field is multiplied for each damping region with the coefficient, but this should only be done one. Attached patch fixes this. damping.patch (911 bytes)
diff --git a/src/fvOptions/sources/derived/damping/damping/damping.C b/src/fvOptions/sources/derived/damping/damping/damping.C index 5c7c395..395aebc 100644 --- a/src/fvOptions/sources/derived/damping/damping/damping.C +++ b/src/fvOptions/sources/derived/damping/damping/damping.C @@ -58,15 +58,15 @@ Foam::tmp<Foam::volScalarField::Internal> Foam::fv::damping::forceCoeff() const ); scalarField& forceCoeff = tforceCoeff.ref(); - const scalar lambda = lambda_.value(); - forAll(origins_, i) { const vectorField& c = mesh_.cellCentres(); const scalarField x((c - origins_[i]) & directions_[i]); - forceCoeff = lambda*max(forceCoeff, scale_->value(x)); + forceCoeff = max(forceCoeff, scale_->value(x)); } + forceCoeff *= lambda_.value(); + // Write out the force coefficient for debugging if (debug && mesh_.time().writeTime()) { |
|
Thanks for the clarification and patch Resolved by commit 1cd4b292eb94446d0aae9d34b096e8a1da93630a |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-07-03 15:57 | jkau | New Issue | |
2019-07-03 16:08 | henry | Note Added: 0010548 | |
2019-07-03 16:37 | henry | Note Added: 0010549 | |
2019-07-04 08:48 | jkau | File Added: damping.patch | |
2019-07-04 08:48 | jkau | Note Added: 0010550 | |
2019-07-04 14:33 | henry | Assigned To | => henry |
2019-07-04 14:33 | henry | Status | new => resolved |
2019-07-04 14:33 | henry | Resolution | open => fixed |
2019-07-04 14:33 | henry | Fixed in Version | => dev |
2019-07-04 14:33 | henry | Note Added: 0010551 |