View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001368 | OpenFOAM | Bug | public | 2014-08-06 12:58 | 2014-08-08 11:55 |
Reporter | Assigned To | henry | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu | OS Version | 12.04 |
Summary | 0001368: uniformFixedGradient causes scalar field to explode to infinity | ||||
Description | I have been running a version of pimpleFoam with the addition of a scalar transport equation, testing it on the pitzdaily tutorial case. With the uniformFixedGradient condition (constant value) set on the upper wall I have seen the internal field values rocket to infinity by the first output step. Using the fixedGradient condition with the same value doesn't display the problem, the solution is as expected. I appear to have remedied the situation by placing a call to fixedGradientFvPatchField<Type>::evaluate() after the call to fixedGradientFvPatchField<Type>::updateCoeffs() in the updateCoeffs() method of uniformFixedGradient, but I don't know if this is a robust, efficient or sensible solution. | ||||
Steps To Reproduce | Modify version of pimpleFoam to include scalar transport, specify boundary condition of scalar on upper surface to uniformFixedGradient, with zero inlet and zeroGradient outlet. | ||||
Tags | No tags attached. | ||||
|
When you say "by the first output step" do you mean the first step executed or the first written? If the latter how many time-steps were executed before the first written step? I have studied the code and I believe the error is in the constructor rather than the updateCoeffs and an evaluate() is needed at the end of template<class Type> uniformFixedGradientFvPatchField<Type>::uniformFixedGradientFvPatchField ( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, const dictionary& dict ) : fixedGradientFvPatchField<Type>(p, iF), uniformGradient_(DataEntry<Type>::New("uniformGradient", dict)) { if (dict.found("gradient")) { this->gradient() = Field<Type>("gradient", dict, p.size()); } else { const scalar t = this->db().time().timeOutputValue(); this->gradient() = uniformGradient_->value(t); } this->evaluate(); } |
|
Hi Henry, Yes, it was occurring on the first time-step, written or not. I tried it with the modification as you suggest and it fixed the problem, as well as making sense. Robin |
|
Resolved by commit b9839e576d57f1ad96da36b681db2da81daf36b2 |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-08-06 12:58 |
|
New Issue | |
2014-08-07 16:56 | henry | Note Added: 0003196 | |
2014-08-08 09:37 |
|
Note Added: 0003197 | |
2014-08-08 11:54 | henry | Note Added: 0003198 | |
2014-08-08 11:54 | henry | Status | new => resolved |
2014-08-08 11:54 | henry | Resolution | open => fixed |
2014-08-08 11:54 | henry | Assigned To | => henry |