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

error with new+modified interfaceProperties library

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

Like Tree1Likes
  • 1 Post By mkraposhin

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 7, 2016, 10:50
Default error with new+modified interfaceProperties library
  #1
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Hello,

i am trying to modify the interfaceProperties lib. To do this i created a new library (say "myInterfaceProperties"), which, for the moment, looks exactly as the original one. The only difference is that i am trying to pass more fields to the library. I modified the constructors part in interfaceProperties.C as follow (red parts are new)


Code:
// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
Foam::myInterfaceProperties::myInterfaceProperties
(
    const volScalarField& alpha1,
    const volVectorField& U,
    const volScalarField& DeltaX,
    const volScalarField& DeltaY,
    const IOdictionary& dict
)
:    
    alpha1_(alpha1),
    U_(U),
    dx_(DeltaX),
    dy_(DeltaY),
Then, i added the declaration of the two new variables in interfaceProperties.H

Code:
 
const volScalarField& alpha1_;
const volVectorField& U_;
const volScalarField& dx_;
const volScalarField& dy_;
DeltaX and DeltaX are defined in the main code as volScalarField.
I called the new library in createField.H as

Code:
myInterfaceProperties interface(alpha1, U, DeltaX, DeltaY, twoPhaseProperties);
I have successfully compiled both the new library and the main code but when i try to run the code i get this error just after the library is called

Code:
Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::myInterfaceProperties::myInterfaceProperties(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::IOdictionary const&) at ??:?
#4
 at ??:?
#5  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6
 at ??:?
Segmentation fault (core dumped)
Note that i am not even using DeltaX DeltaY, this was just a test to see if the new variables were correctly passed to the new library and it seems they are not.

Any idea about the error?

Andrea
Andrea_85 is offline   Reply With Quote

 

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
[Other] Multi species mass transport library [update] novyno OpenFOAM Community Contributions 111 November 9, 2021 23:37
ERROR: unable to find library HJH CFX 6 February 26, 2019 06:52
decomposePar is missing a library whk1992 OpenFOAM Pre-Processing 8 March 7, 2015 07:53
Compiled library vs. inInclude Files, DSMC solver crashes after run GPesch OpenFOAM Programming & Development 8 April 18, 2013 07:17
OpenFOAM141dev linking error on IBM AIX 52 matthias OpenFOAM Installation 24 April 28, 2008 15:49


All times are GMT -4. The time now is 16:50.