CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Unable to read the Temperature field with Paraview

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2020, 08:40
Default Unable to read the Temperature field with Paraview
  #1
New Member
 
Francesco95's Avatar
 
Francesco Latella
Join Date: Apr 2020
Location: Bergamo, Italy
Posts: 15
Rep Power: 6
Francesco95 is on a distinguished road
Hi guys, I'm translating a solver with a conjugate heat transfer method implemented in interFoam from the version 2.2.1 of OF to the 7. I did it, and I was also able to run a test case, but when I try to visualize the result, I get an error by paraview for every processor, I show you just for one



Code:
  ERROR: In /home/ag600/OpenFOAM/ThirdParty-2.2.1/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
 vtkOpenFOAMReaderPrivate (0x2e89940): Error reading line 675043 of /media/ag600/D1/FrancescoLatella/TEST_MYMULTIREG_V7/processor39/0.0011/fluid/T.gz: Unmatched }
 p, li { white-space: pre-wrap; }
if I go to see what's is the problem inside the T.gz file at that line, I see that I have all the temperature values for each point of the mesh (so it seems that is working well and managinf with the temperature fields and the mesh well) but in one of the boundary conditions, the one coupled with the liquid domain, I have this



Code:
boundaryField
{
    top
    {
        type            regionCoupleHeatFlux;
        neighbourRegionName fluid;
        ownRegionName   solid;
        neighbourPatchName bottom;
        ownPatchName    top;
        neighbourFieldName T;
        ownFieldName    T;
        ownThermalConductivity KS;
        value  

      }
and the line that get me the error is exactly the line where there is "value" without other things and without the ";". Looking at the temperature file of this test case launched with the 2.2.1 version of this solver, this boundary conditions looks in this way


Code:
boundaryField
{
    top
    {
        type            regionCoupleHeatFlux;
        neighbourRegionName fluid;
        ownRegionName   solid;
        neighbourPatchName bottom;
        ownPatchName    top;
        neighbourFieldName T;
        ownFieldName    T;
        ownThermalConductivity KS;
        value           nonuniform List<scalar>
where you can see that there is not just "value" but "value nonuniform List<scalar". So it seems that this is the problem, that my translated solver is not making the new temperature files correctly.


Which should be the reason? If anyone could help me I will be really thankfull!



What I was thinking is that, maybe a did some error in the solver's code when I create the solid and fluid meshes. I say this because I'm not really sure about what I did because interFoam 7 use the dynamicFVmesh class instead of the normal static mesh class, so I tried to use this new class just trying to modify arguments and see what happen. I put also my createDynamicMesh.H file here if anyone will see some error in how I used this class


Code:
 Info<< "Creating meshes "
        << runTime.timeName() << nl << endl;

// **********************************************************************
//  Fluid mesh
// **********************************************************************
    autoPtr<dynamicFvMesh> fluidmeshPtr
    (
        dynamicFvMesh::New
        (
            IOobject
            (
                "fluid",
                //dynamicFvMesh::fluid,
                runTime.timeName(),
                runTime,
                IOobject::MUST_READ
            )
        )
    );

    dynamicFvMesh& fluidMesh = fluidmeshPtr();

// **********************************************************************
//  Solid mesh
// **********************************************************************
    autoPtr<dynamicFvMesh> solidmeshPtr
    (
        dynamicFvMesh::New
        (
            IOobject
            (
                "solid",
                //dynamicFvMesh::solid,
                runTime.timeName(),
                runTime,
                IOobject::MUST_READ
            )
        )
    );

    dynamicFvMesh& solidMesh = solidmeshPtr();
Francesco95 is offline   Reply With Quote

Old   September 11, 2020, 09:07
Default Error in the post
  #2
New Member
 
Francesco95's Avatar
 
Francesco Latella
Join Date: Apr 2020
Location: Bergamo, Italy
Posts: 15
Rep Power: 6
Francesco95 is on a distinguished road
Thank you in advance to anyone will help me!
Francesco95 is offline   Reply With Quote

Old   September 11, 2020, 11:43
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Francesco95 View Post
Hi guys, I'm translating a solver with a conjugate heat transfer method implemented in interFoam from the version 2.2.1 of OF to the 7. I did it, and I was also able to run a test case, but when I try to visualize the result, I get an error by paraview for every processor, I show you just for one

if I go to see what's is the problem inside the T.gz file at that line, I see that I have all the temperature values for each point of the mesh (so it seems that is working well and managinf with the temperature fields and the mesh well) but in one of the boundary conditions, the one coupled with the liquid domain, I have this

Code:
boundaryField
{
    top
    {
        type            regionCoupleHeatFlux;
        neighbourRegionName fluid;
        ownRegionName   solid;
        neighbourPatchName bottom;
        ownPatchName    top;
        neighbourFieldName T;
        ownFieldName    T;
        ownThermalConductivity KS;
        value  
      }
and the line that get me the error is exactly the line where there is "value" without other things and without the ";".

Having "value" with nothing else looks pretty bad. You might want to review how boundary condition is actually emitting the values. Starting with OpenFOAM-v1712, many of the dictionary write key/value constructs were augmented with a simpler Ostream::writeEntry() method, but the older methods were left intact (for compatibility etc).

However you are using the openfoam.org version, you probably needed to rewrite some of your output code. Some of the more recent openfoam.org versions did something similar to the openfoam.com version, but decided to make it an output template instead of a method and removed the old methods. Although it generally should work, but it could be that you are missing a template specialization somewhere that is causing your output to be swallowed. Not really sure what else to suggest. Depending on which models you use, could also try with OpenFOAM-v2006 and see how that works out.
olesen is offline   Reply With Quote

Old   September 12, 2020, 10:11
Default
  #4
New Member
 
Francesco95's Avatar
 
Francesco Latella
Join Date: Apr 2020
Location: Bergamo, Italy
Posts: 15
Rep Power: 6
Francesco95 is on a distinguished road
Hi Olesen, thank you for the quick reply. Here is how my boundary conditions do the output I guess


Code:
//- Write
void Foam::regionCoupleTemperatureFvPatchScalarField::write
(
    Ostream& os
) const
{
    fvPatchScalarField::write(os);
    coupleManager_.writeEntries(os);
    os.writeKeyword("Kappa") << Kappa_ << token::END_STATEMENT << nl;
   writeEntry( os, "value"); //writeEntry("value", os);
  
}

and I guess that the line that makes me problems is "writeEntry( os, "value");" but unfortunately I'm not familiar with this part of a code so it's a bit tricky for me to understand how to modify it. Consider that, this code is working in the 2.2.1 version of OF but not in the 7.
Francesco95 is offline   Reply With Quote

Reply

Tags
class, conjugate heat transfer, dynamic mesh, interfoam, paraview


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion faizan_habib7 CFX 4 February 1, 2016 18:00
''unknown radialModelType type Gidaspow'' PROBLEM WITH THE BED TUTORIAL AndoniBM OpenFOAM Running, Solving & CFD 2 March 25, 2015 19:44
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 11:52
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27
[General] Paraview Plot Temperature 3D boristheblade ParaView 0 May 25, 2012 21:37


All times are GMT -4. The time now is 10:40.