View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001845 | OpenFOAM | Bug | public | 2015-09-04 08:01 | 2020-11-21 21:36 |
Reporter | DanielJ | Assigned To | henry | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | suspended | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 14.10 |
Summary | 0001845: potentialFoam fails to initialize pressure-driven flows | ||||
Description | PotentialFoam fails on a very simple pressure-driven flow (attached case). " GAMG: Solving for Phi, Initial residual = 0, Final residual = 0, No Iterations 0 Continuity error = 0 Interpolated velocity error = 0 Calculating approximate pressure field GAMG: Solving for p, Initial residual = nan, Final residual = nan, No Iterations 100 GAMG: Solving for p, Initial residual = nan, Final residual = nan, No Iterations 100 --> FOAM FATAL IO ERROR: wrong token type - expected Scalar, found on line 0 the word 'nan' " Looking at the source of potentialFoam it seams like it was designed only for "velocity-driven" flows. | ||||
Tags | No tags attached. | ||||
|
|
|
> Looking at the source of potentialFoam it seams like it was designed only for "velocity-driven" flows. Correct. How would you change it to support pressure-driven flows? |
|
My quick answer would be to create Phi boundary field by cloning pressure boundary field and not just use its types. |
|
I do not believe that is correct. If you set a static pressure drop in a channel what do you think the velocity field from the potential solution should be? |
|
Yes, mu answer was silly. In a channel with a constant section area there cannot be a pressure drop in a potential solution. |
|
It would be nice though if potentialFoam could handle the totalPressure boundary condition, but I think it would require special handling of this type and modifying initial velocity patch field. |
|
I think this is equivalent to specifying the inlet velocity. |
|
Yes this is true from the "program's point of view" and this is why it can be done with this approach. But from the user's point of view he defines total pressure because he knows total pressure and does not know the velocity. The actual velocity will be calculated by the viscous simulation. |
|
If the user knows the inlet total pressure and the outlet static pressure the velocity can be estimated but it is likely that the approximate inlet velocity is already known. I suggest that this is used for the potential solution and then the inlet BC changed to total-pressure for the NS solver. |
|
Editing huge result files is not as sexy as it sounds :) I think that it could be implemented in probably around 20 LOC. To make it elegant a virtual fucntion like 'velocityDependent' or maybe simply 'setsTotalPressure' could be added to fvPatchField. This way also uniformTotalPressure could be handled without explicit reference. Backward compatibility in behavior and less burden on the user is very valuable. |
|
> Editing huge result files is not as sexy as it sounds :) This is easily automated with scripts or the tools we already provide. I do not see a need to expand the already large interface in fvPatchField just for this application, there are better ways. How would you handle the case of several inlets and outlets with different total and static pressures? I am not convinced that any kind of potential solution based on the pressure boundary conditions will provide a pysical or useful velocity field. Another option would be to provide an option to potentialFoam to read an alternative velocity field with BCs appropriate for the potential solution (esitimated, derived from total pressure or calculated by some other means) then solve for the potential velocity field from this and apply the solution to the real velocity field file. |
|
> This is easily automated with scripts or the tools we already provide. True > I do not see a need to expand the already large interface in fvPatchField just for this application, there are better ways. You are probably right that this is a very specific problem and not a reason to modify fvPatchField. However a large interface (whatever that means) is in my opinion not a good reason to reject functionality. > How would you handle the case of several inlets and outlets with different total and static pressures? I am not convinced that any kind of potential solution based on the pressure boundary conditions will provide a physical or useful velocity field. Multiple inlets is not a problem. Only one outlet with pressure specified makes physical sense. To have multiple "outlets" with pressure specified you need a boundary condition that switches between fixedValue and totalPressure depending on the flow direction. > Another option would be to provide an option to potentialFoam to read an alternative velocity field with BCs appropriate for the potential solution (esitimated, derived from total pressure or calculated by some other means) then solve for the potential velocity field from this and apply the solution to the real velocity field file. This is a possible solution, but to use it user needs to go through the docs to find out what to do and why he needs to do this, instead of it "just working". Also if he does not know about this option beforehand and gets an error similar to mine he will not know why it happened and what to do, especially since it "worked" in the previous version. |
|
It is not clear what should be done here, funding will be required to implement and test the options. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-09-04 08:01 | DanielJ | New Issue | |
2015-09-04 08:01 | DanielJ | File Added: potentialTest.zip | |
2015-09-04 09:19 | henry | Note Added: 0005322 | |
2015-09-04 09:42 | henry | Severity | major => feature |
2015-09-04 09:50 | DanielJ | Note Added: 0005323 | |
2015-09-04 09:55 | henry | Note Added: 0005324 | |
2015-09-04 10:06 | DanielJ | Note Added: 0005325 | |
2015-09-04 10:27 | DanielJ | Note Added: 0005326 | |
2015-09-04 10:31 | henry | Note Added: 0005327 | |
2015-09-04 10:41 | DanielJ | Note Added: 0005328 | |
2015-09-04 11:22 | henry | Note Added: 0005329 | |
2015-09-04 12:12 | DanielJ | Note Added: 0005330 | |
2015-09-04 12:43 | henry | Note Added: 0005331 | |
2015-09-04 13:40 | DanielJ | Note Added: 0005332 | |
2020-11-21 21:36 | henry | Assigned To | => henry |
2020-11-21 21:36 | henry | Status | new => closed |
2020-11-21 21:36 | henry | Resolution | open => suspended |
2020-11-21 21:36 | henry | Note Added: 0011724 |