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

codedFixedValue BC on rhoCentralFoam producing crash

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2020, 05:02
Default codedFixedValue BC on rhoCentralFoam producing crash
  #1
New Member
 
Anthony Gay
Join Date: Oct 2019
Posts: 17
Rep Power: 6
anthonygay1812 is on a distinguished road
Hello Everyone

I'm working on a project and I've been trying to get the coded fixed value BC running on the rhoCentralFoam solver however when I try and do this it produces a crash with no error output. This is my logFile

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package 
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

Using dynamicCode for patch sides on field p at line 1030 in "/home/anthonygay1812/OpenFOAM/tutorials/tutorials/compressible/rhoCentralFoam/shockTube/0/p.boundaryField.sides"
Then thats it. The compilation output is in a setfields log file and theres no error. The solver just stops. I've tried debugging with gdb and the code exits with this
Code:
[Inferior 1 (process 17977) exited with code 0220]
Which ive looked into but it didnt tell me a whole lot. I'm on WSL and running version 7.

Thank you!

p.orig file
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    sides
    {
        type            codedFixedValue;
        value           $internalField;
        redirectType    HPCFluid;
        code
  #{
                operator==(0.5*sin(3.14*this->db().time().value())/2);

  #};

codeOptions
#{
    -I$(LIB_SRC)/finiteVolume/lnInclude
#};

    //type            fixedValue;
    //value           uniform 1;
        
    }

    empty
    {
        type            empty;
    }
}

// ************************************************************************* //
anthonygay1812 is offline   Reply With Quote

Old   May 8, 2020, 06:33
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: 932
Rep Power: 12
HPE is on a distinguished road
- Can you try to use the "fixedValue" to see if the same error occurs?
- Can you try to write a simpler "codedBC" to see if the same error occurs?
- Is it possible for you to run the same case in a Linux distro to isolate whether the issue is related to Windows?
HPE is offline   Reply With Quote

Old   May 8, 2020, 23:47
Default
  #3
New Member
 
Anthony Gay
Join Date: Oct 2019
Posts: 17
Rep Power: 6
anthonygay1812 is on a distinguished road
Hi HPE

Thanks for the response
Quote:
Originally Posted by HPE View Post
- Can you try to use the "fixedValue" to see if the same error occurs?
I have tried fixed value and the program runs successfully, no crash.

Quote:
Originally Posted by HPE View Post
- Can you try to write a simpler "codedBC" to see if the same error occurs?
The crash does happen with less complicated/more complicated operators, I just now tried with operator==(min(10, 0.1)); and the same crash happened.

Quote:
Originally Posted by HPE View Post
- Is it possible for you to run the same case in a Linux distro to isolate whether the issue is related to Windows?
I'll get back to you on this, I normally have access to a computational cluster with linux/openFoam installed and was going to try running it on that but I've been having issues connecting remotely. I think its a good thing to try so I'll let you know if I can find a linux machine to test it on.
anthonygay1812 is offline   Reply With Quote

Old   May 9, 2020, 00:37
Default
  #4
New Member
 
Anthony Gay
Join Date: Oct 2019
Posts: 17
Rep Power: 6
anthonygay1812 is on a distinguished road
Quote:
Originally Posted by HPE View Post
- Is it possible for you to run the same case in a Linux distro to isolate whether the issue is related to Windows?
Bingo! It did work on a remote Linux machine so its a Windows related crash. Unfortunately I havent been able to compile my custom code related to my project on the cluster with Linux on it so it would be ideal to find a workaround on my windows machine. But, progress!

Thank you!
anthonygay1812 is offline   Reply With Quote

Old   May 9, 2020, 02:32
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: 932
Rep Power: 12
HPE is on a distinguished road
Good to hear "Bingo" .

I kindly suggest you that if you think this is a bug - please do report it to the Foundation issue tracker, for which you can find the link below.

Thank you.
HPE is offline   Reply With Quote

Reply

Tags
codedfixedvalue, openfoam 7, rhocentrafoam


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
including parameter file in codedFixedValue Loekatoni OpenFOAM Running, Solving & CFD 4 November 9, 2023 16:56
Modify rhoCentralFoam: other equations of state fivos OpenFOAM Programming & Development 5 July 29, 2020 13:17
codedFixedValue: accessing other patch causes crash in parallel RL-S OpenFOAM Running, Solving & CFD 2 December 24, 2019 21:20
Always crash when solve a C-D nozzle flow field using rhoCentralFoam hawklion OpenFOAM Running, Solving & CFD 0 March 9, 2011 06:13
Always crash when solve a C-D nozzle flow field using rhoCentralFoam hawklion OpenFOAM 3 March 8, 2011 19:03


All times are GMT -4. The time now is 02:07.