CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

OpenFOAM 1906 timeVaryingMappedFixedValue + parallel

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2020, 22:58
Default OpenFOAM 1906 timeVaryingMappedFixedValue + parallel
  #1
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Dear FOAMers,

I was wondering if timeVaryingMappedFixedValue + pointDisplacement + parallel does not work in OpenFOAM v1906 or I did something wrong with my case.

I try to modify pitzDailyExptInlet case to test the moving boundary.
I add the following files
1. 0/pointDisplacement,
2. constant/boundaryData/inlet/0/pointDisplacement.
3. constant/dynamicMeshDict where displacementLaplacian is used.
The fvSolution file is also edited accordingly.

Then run in parallel.
mpirun -np 4 moveDynamicMesh -parallel

The error shows points file does not exist. But it is there, and it runs without any error in serial.

In addition, the original case without any modification runs well in parallel.

/////// Message Excerpt===========
Create mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: displacementLaplacian
[1]
[1]
[1] --> FOAM FATAL IO ERROR:
[1] file "../constant/boundaryData/inlet/points" does not exist
[1]
[1] file: ../constant/boundaryData/inlet/points at line 1.
[1]
[1] From function Foam::IFstream& Foam::IFstream:perator()() const
[1] in file db/IOstreams/Fstreams/IFstream.C at line 221.
[1]
FOAM parallel run exiting

Someone can confirm this? Any hints will be appreciated!

Michael
Michael@UW is offline   Reply With Quote

Old   May 28, 2020, 17:24
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Hi,

- `points` file containing three-dimensional position data is required in order to map the corresponding boundary information onto the inlet patch.
- please search for an example within tutorials where `points` file is used in association with `timeVar*` boundary condition.

Hope this helps a bit.
HPE is offline   Reply With Quote

Old   May 28, 2020, 18:02
Default
  #3
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi,

- `points` file containing three-dimensional position data is required in order to map the corresponding boundary information onto the inlet patch.
- please search for an example within tutorials where `points` file is used in association with `timeVar*` boundary condition.

Hope this helps a bit.
Hi HPE,

Thank you for your reply.
I am pretty sure 'point' file is there with correct formats. As the case is copied from the tutorial and it runs well in serial.

Strangely, I did nothing but switch to OpenFOAM 6, it runs without any issue in parallel. I was just wondering if it is a bug of OpenFOAM v1906 or something else was wrong with my environment.
Michael@UW is offline   Reply With Quote

Old   May 28, 2020, 18:14
Default
  #4
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
I attached my case. It would be appreciated if you could have a quick test.
Attached Files
File Type: zip pitzDailyExptInlet.zip (14.2 KB, 47 views)
Michael@UW is offline   Reply With Quote

Old   May 29, 2020, 17:49
Default
  #5
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Hi,

I will see what I can do - I will test your case. Please do not hesitate to poke me if I don't get back to it (sometimes, I lose the track of the posts that I promised to provide an answer).
HPE is offline   Reply With Quote

Old   May 29, 2020, 17:58
Default
  #6
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi,

I will see what I can do - I will test your case. Please do not hesitate to poke me if I don't get back to it (sometimes, I lose the track of the posts that I promised to provide an answer).
Thank you for being willing to test my case! Looking forward to hearing from you.

By the way, in timeVaryingMappedFixedValue, is it possible to repeat the cycle like timeVaryingUniformFixedValue by setting outOfBounds repeat?
Michael@UW is offline   Reply With Quote

Old   May 29, 2020, 18:02
Default
  #7
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
sorry, what cycle? (might be my IQ dropped to a single-digit ).
HPE is offline   Reply With Quote

Old   May 29, 2020, 18:24
Default
  #8
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by HPE View Post
sorry, what cycle? (might be my IQ dropped to a single-digit ).
Sorry for the confusion. I want to run the simulation up to 10s but only provide the data up to 5s, because the boundary condition at inlet repeats during 6s~10s.
So I want to reuse the data in:
constant/boundaryData/inlet/0
constant/boundaryData/inlet/1
constant/boundaryData/inlet/2
...
constant/boundaryData/inlet/5

In short, I do not want to provide all the data for the second cycle.

Hopefully, it is clearer to state my problem.
Michael@UW is offline   Reply With Quote

Old   June 2, 2020, 17:48
Default
  #9
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi,

I will see what I can do - I will test your case. Please do not hesitate to poke me if I don't get back to it (sometimes, I lose the track of the posts that I promised to provide an answer).
Hi Dear HPE,
Just wondering if you have tested the case or any findings.

Regards,
Michael
Michael@UW is offline   Reply With Quote

Old   June 4, 2020, 17:00
Default
  #10
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
I'm very sorry that I still couldn't touch it. Yet it is on my list.
HPE is offline   Reply With Quote

Old   June 4, 2020, 17:14
Default
  #11
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by HPE View Post
I'm very sorry that I still couldn't touch it. Yet it is on my list.
No problem. I appreciate your time.
Michael@UW is offline   Reply With Quote

Old   July 28, 2020, 22:23
Default
  #12
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by HPE View Post
I'm very sorry that I still couldn't touch it. Yet it is on my list.
Dear HPE,

Did you have a chance to run the test case? I encountered this problem again. After upgrading to OpenFOAM v2006, I applied timeVaryingMappedFixedValue type on my moving wall (pointMotionU). It runs well in serial but gives an error regarding matchPoint. I think it is quite the same problem.

In pointMotionU
Code:
    wall
    {
        type            timeVaryingMappedFixedValue;
        mapMethod       nearest;
        setAverage      off;
        offset          ( 0 0 0 );
        points          "points";
    }


The output (only in parallel):
Code:
[1] Cannot find point in pts1 matching point 284 coord:(0 0 0) in pts0 when using tolerance 1e+15
[0] Cannot find point in pts1 matching point 238 coord:(-0.00098 0 0) in pts0 when using tolerance 1e+15
[0] Searching started from:0 in pts1
[1] Searching started from:0 in pts1
[1] Cannot find point in pts1 matching point 286 coord:(0 1.313131313e-05 0) in pts0 when using tolerance 1e+15
....
And error message:
Code:
[0] --> FOAM FATAL ERROR: 
[0] Did not find a corresponding sourcePoint for every face centre
[0] 
[0]     From void Foam::pointToPointPlanarInterpolation::calcWeights(const pointField&, const pointField&)
[0]     in file triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C at line 159.
[0] 
FOAM parallel run exiting
[0] 
[1] 
[1] 
[1] --> FOAM FATAL ERROR: 
[1] Did not find a corresponding sourcePoint for every face centre
[1] 
[1]     From void Foam::pointToPointPlanarInterpolation::calcWeights(const pointField&, const pointField&)
[1]     in file triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C at line 159.
[1] 
FOAM parallel run exiting
[1] 
[cfd-me:24292] 1 more process has sent help message help-mpi-api.txt / mpi-abort
[cfd-me:24292] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
All the points on the boundary with timeVaryingMappedFixedValue type are not matched

I'm sure all the data are correct which is confirmed by running in serial.

I tested the same case in OpenFOAM-7; there is no problem. But I need to use overset in ESI version.


Thank you!
Michael
Michael@UW is offline   Reply With Quote

Old   July 29, 2020, 14:46
Default
  #13
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
The problem has been (kind of) solved by modifying some codes in the source file:
Code:
/home/michael/OpenFOAM/OpenFOAM-v2006/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C
1. time.caseConstant() -> time.constant(). The former returns ../constant and the latter gives constant
Code:
        const fileName samplePointsFile
        (
           //time.caseConstant()
           time.constant()
           /"boundaryData"
           /this->patch().name()
           /"points"
        );
2. It seems rawIOField is not initialized correctly, so I use IFstream read the data file.

Code:
        // IOobject io
        // (
        //     samplePointsFile,   // absolute path
        //     time,
        //     IOobject::MUST_READ,
        //     IOobject::NO_WRITE,
        //     false,              // no need to register
        //     true                // is global object (currently not used)
        // );

        // Read data
        // const rawIOField<point> samplePoints(io, false);


        pointField samplePoints((IFstream(samplePointsFile)()));
3. But this will cause vals.average() being not declared, because vals is not a rawIOField any more. So I copied and included the files AverageField.H and AverageField.C from OpenFOAM-7.
Code:
//#include "rawIOField.H"  // deleted

//# Copied from OpenFOAM-7
#include "AverageField.H"
#include "IFstream.H"
Then replaced the codes for "setAverage_" condition.

Code:
// replaced 
            // IOobject io
            // (
            //     valsFile,   // absolute path
            //     time,
            //     IOobject::MUST_READ,
            //     IOobject::NO_WRITE,
            //     false,              // no need to register
            //     true                // is global object (currently not used)
            // );

            // const rawIOField<Type> vals(io, setAverage_);

            // if (setAverage_)
            // {
            //     startAverage_ = vals.average();
            // }
//////////////////////////////////// 
// with

            Field<Type> vals;

            if (setAverage_)
            {
                AverageField<Type> avals((IFstream(valsFile)()));
                vals = avals;
                startAverage_ = avals.average();
            }
            else
            {
                IFstream(valsFile)() >> vals;
            }
//////////////////////////////////// End of Added
Otherwise, it will give the error:
"Number of values (0) differs from the number of points ( ) in file ...
when the data file has the format (uniform):
Code:
720{(0 0 0)}.
This file is generated by OpenFOAM API.

4. wmake, then it runs.

Hope someone can confirm this solution or propose a better one.
Michael@UW is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
Openfoam parallel calculation performance study - Half performance on mpirun Jurado OpenFOAM Running, Solving & CFD 22 March 24, 2018 20:40
[Commercial meshers] OpenFoam Mesh to Fluent Mesh in parallel case DominicTNC OpenFOAM Meshing & Mesh Conversion 3 November 22, 2017 09:19
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
OpenFoam parallel on 2 computers : Cannot find file "points" Blue8655 OpenFOAM Running, Solving & CFD 1 June 3, 2015 21:59


All times are GMT -4. The time now is 17:08.