View Issue Details

IDProjectCategoryView StatusLast Update
0002548OpenFOAMContributionpublic2017-05-19 17:33
ReporterShorty Assigned Tohenry  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version16.04
Product Versiondev 
Fixed in Versiondev 
Summary0002548: Added residual control for steady-state cht solver
DescriptionHey Henry,

I added the residual control for the steady-state solver (cht). And removed a bug which is included in the residual control for the transient one.

I attached the patch.
Additional InformationActual bug in the residual control for the transient one is the following line in the » createSolidFields.H «

List<bool> residualReachedSolid(solidRegions.size(), false);

has to be changed to

List<bool> residualReachedSolid(solidRegions.size(), true);

However, in the attached patch it is fixed.
TagschtMultiregionFoam, residualControl

Activities

Shorty

2017-05-11 19:55

reporter  

henry

2017-05-15 14:46

manager   ~0008149

It appears that this patch reverts the changes I made to your previous patch, in particular the code layout and commenting does not correspond to the OpenFOAM style guidelines and the interface to the radiation model is out of date.

Could you pull the latest OpenFOAM-dev including all the corrections I made to your previous patch and provide a patch to that version adding the steady-state residual control?

henry

2017-05-15 14:51

manager   ~0008150

I have applied the correction to residualReachedSolid: commit 2e3ee64e04e8befa616e96c93717f46cd9af5054

Shorty

2017-05-15 14:59

reporter   ~0008151

Of course. I will pull the dev line first and then give you the updated patch. Sorry I am forgetting that to often :)

Shorty

2017-05-15 22:03

reporter   ~0008152

Hey Henry,

okay. Now again :)
First not really necessary change is related to the actual residual control for the transient one. I changed the file readSolidMultiRegionResidualControls.H for a easier understanding. Since there is only the enthalpy field we will analyze, there is no need for the check I did before. It was more related to the fact that fluid and solid look equal.

I added the corrected file.
readSolidMultiRegionResidualControls.H (554 bytes)   
    const dictionary& residualControl =
        mesh.solutionDict().subDict("PIMPLE").subOrEmptyDict("residualControl");

    scalar hTol = -1.;

    if (!residualControl.empty())
    {
        if (!residualControl.subOrEmptyDict("h").empty())
        {
            hTol = readScalar(residualControl.subDict("h").lookup("tolerance"));

            // Used residual control for actual solid region
            if (hTol != -1)
            {
                residualControlUsed = true;
                resReachedSolid = false;
            }
        }
    }

Shorty

2017-05-15 22:55

reporter   ~0008153

The residual control for the SIMPLE solver will come tomorrow. I have to recompile FOAM-dev to check everything.

Shorty

2017-05-18 22:27

reporter   ~0008163

Hi Henry,

I added the patch. Checked with transient and steady state. I added a boolean operation to the transient one, in order to remove the problem if one sets the residual control for the velocity but the momentumPredictor is not turned on.

It was in the residualControlsFluid.H

if (UTol == -1)
{
    UConv = true;
}

become


if (UTol == -1 && !momentumPredictor)
{
    UConv = true;
}

But it is in the patch. Also radiation should be included now. The style should be okay too. Let me know if there is a problem.

henry

2017-05-19 17:33

manager   ~0008167

Thanks for the contribution

Resolved by commit 997ee4eba59f986664d41ac2c036ef1670689387

Issue History

Date Modified Username Field Change
2017-05-11 19:55 Shorty New Issue
2017-05-11 19:55 Shorty File Added: chtMultiRegionFoam.tar.gz
2017-05-11 19:55 Shorty Tag Attached: residual control chtMultiRegionFoam
2017-05-11 19:56 Shorty Tag Detached: residual control chtMultiRegionFoam
2017-05-11 19:57 Shorty Tag Attached: chtMultiregionFoam
2017-05-11 19:57 Shorty Tag Attached: residualControl
2017-05-15 14:46 henry Note Added: 0008149
2017-05-15 14:51 henry Note Added: 0008150
2017-05-15 14:59 Shorty Note Added: 0008151
2017-05-15 22:03 Shorty File Added: readSolidMultiRegionResidualControls.H
2017-05-15 22:03 Shorty Note Added: 0008152
2017-05-15 22:55 Shorty Note Added: 0008153
2017-05-18 22:27 Shorty File Added: chtMultiRegionFoam.tar-2.gz
2017-05-18 22:27 Shorty Note Added: 0008163
2017-05-19 17:33 henry Assigned To => henry
2017-05-19 17:33 henry Status new => resolved
2017-05-19 17:33 henry Resolution open => fixed
2017-05-19 17:33 henry Fixed in Version => dev
2017-05-19 17:33 henry Note Added: 0008167