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

code compiled on foam-extend, though not working!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2020, 09:01
Default code compiled on foam-extend, though not working!
  #1
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Dear foamers,

I have compiled an external library for inflow turbulence generation b.c. on foam-extend 4.0. The code seems to be successfully compiled, no error in runtime. However, it does not work apparently.

There is an if-clause in the code telling to print some message if the master process is involved (decayingTurbulenceFvPatchVectorField.C):

Code:
    if (Pstream::master())
    {
        Pout<<"Starting inflgen, time = "<<this->db().time().elapsedClockTime()<<" s"<<endl;
        forAll(CF, I)
        {
            if (L[I] > 0.0)
            {
                scalar x    = CF[I].x();
                scalar ls   = lspot(L[I]);
                scalar ymin = CF[I].y() - L[I];
                scalar zmin = CF[I].z() - L[I];

                for (label k = 0; k < NUM_VORT; k++)
                {
                    vector v((direction_ > 0) ? x-ls : x+ls, ymin+ranGen.scalar01()*2*L[I], zmin+ranGen.scalar01()*2*L[I]);
                    bool allowed = true;
                    for (SLList<decayingVorton>::const_iterator it = vortons_.begin(); it != vortons_.end(); ++it)
                    {
                        if (mag(v - it().location()) < OVERLAP*ls)
                        {
                            allowed = false;
                            break;
                        }
                    }
                    if (!allowed)
                        continue;
                    else
                        vortons_.insert(decayingVorton(L[I], v, RF[I], (direction_ > 0) ? x+ls : x-ls));
                }
            }
        }
In other words, I shall be able to see the output message in either serial or parallel mode, but I don't see it in the solver log (pimpleFoam).

I have attached the code for people willing to help! I appreciate any hint

Kind regards,
syavash

P.S: The library originally developed for OpenFOAM 2.3.1, I tried to port it to foam-extend.
Attached Files
File Type: zip LeMOS.zip (8.6 KB, 0 views)
syavash is offline   Reply With Quote

Reply


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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[snappyHexMesh] Invalid Normals for source face to target face while making AMI? Sorabh OpenFOAM Meshing & Mesh Conversion 1 August 3, 2021 06:35
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 04:18
probe Locations error in the dynamicMesh foam extend 4.0 vahidreza lotfi OpenFOAM Post-Processing 2 August 22, 2018 10:30


All times are GMT -4. The time now is 14:34.