View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000535 | OpenFOAM | Bug | public | 2012-05-15 07:58 | 2013-06-12 05:16 |
Reporter | Assigned To | henry | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | PC | OS | Linux Red-Hat | OS Version | version 2.6.18-2 |
Summary | 0000535: pressureGradientExplicitSource does not work in OF 2.1 | ||||
Description | I tried to add a pressure gradient to a flow using the new feature fieldSources, such that I don't have to explicitely add it to the solver anymore. A run time error is reased: --> FOAM FATAL ERROR: request for volScalarField (1|A(U)) from objectRegistry region0 failed available objects of type volScalarField are 5 ( nut k nu p epsilon ) | ||||
Steps To Reproduce | Following the description in the .H file, I have added the following to the sourceProperties dictionary: presGradient { type pressureGradientExplicitSource; active on; //on/off switch timeStart 0.0; //start time duration 1e10; //duration selectionMode all; //cellSet // points //cellZone pressureGradientExplicitSourceCoeffs { UName U; fieldNames (U); Ubar (10 0 0 ); // set Re=64,000 flowDir (1.0 0 0 ); // set Re=64,000 gradPini gradPini [0 2 -2 0 0] 0; // initial pressure gradient } } FieldNames is actually not in the .H description, however, without it is complaining about a missing key word. An example case based on TJunction is added which reases the error. I run it with pimpleFoam | ||||
Additional Information | Added and example case which I run with pimpleFoam to produce the error. | ||||
Tags | No tags attached. | ||||
2012-05-15 07:58
|
|
|
In OpenFOAM-2.1.? the (1|A(U)) is cached in UEqn.H for use in the sources: volScalarField rAU(1.0/UEqn().A()); if (pimple.momentumPredictor()) { solve(UEqn() == -fvc::grad(p) + sources(U)); } Could you check that the solver you are running includes the line volScalarField rAU(1.0/UEqn().A()); |
|
Problem solved: I was using the 2.1.0 version. In this version of pimpleFoam, the sources(U) term is added in the definition of UEqn matrix, which is -before- the declaration of rAU, hence rAU is not found in the library. In the 2.1.x version the sources(U) term is moved to line where solve is called; after the declaration of rAU. So 2.1.x already gives the bug fix. By the way, in my example of the sourceProperties I uploaded I had the wrong dimensions for gradP, but that is easily fixed. Thanks for the quick responds. Eelco |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-15 07:58 |
|
New Issue | |
2012-05-15 07:58 |
|
File Added: TJunctionSources.tgz | |
2012-05-15 09:48 | henry | Note Added: 0001315 | |
2012-05-15 10:56 |
|
Note Added: 0001316 | |
2012-05-15 11:12 | henry | Status | new => resolved |
2012-05-15 11:12 | henry | Resolution | open => fixed |
2012-05-15 11:12 | henry | Assigned To | => henry |