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

I just can't make this solver run

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

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Display Modes
Old   April 28, 2015, 01:11
Default I just can't make this solver run
  #1
New Member
 
Woensug Eric Choi
Join Date: Apr 2015
Posts: 5
Rep Power: 3
kickflipin is on a distinguished road
I just can't make this solver run

I have received a code on the basis to develop further.

I am pretty much new to OpenFOAM environment.

the error saids segmentation failure, which seems it's accessing empty fields.

I am thinking that my setups for the initialization folder 0 could be wrong posed or the solver that I am trying to get it work is not the final version.

Please help. I just want to make this work to compare how it will be with further modification at the code.

Link to my case and the code
https://www.dropbox.com/s/b2anjuxc9i...er.tar.gz?dl=0

Solver Received
https://www.dropbox.com/sh/xp685ojin...rCyBqXWxa?dl=0
kickflipin is offline   Reply With Quote

Old   April 30, 2015, 13:06
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,820
Blog Entries: 39
Rep Power: 108
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
A few quick questions:
  1. For which OpenFOAM version was the solver originally designed for?
  2. Based on which solver was the custom solver designed?
  3. In which OpenFOAM version are you trying to run this custom solver?
wyldckat is offline   Reply With Quote

Old   April 30, 2015, 19:11
Default
  #3
New Member
 
Woensug Eric Choi
Join Date: Apr 2015
Posts: 5
Rep Power: 3
kickflipin is on a distinguished road
For which OpenFOAM version was the solver originally designed for?
-> I don't have answer for this question. But it seems to be the problem..

Based on which solver was the custom solver designed?
-> It seems it's based on 'compressibleInterFoam' modified comparing interPhaseChangeFoam. the energy calculating sections from compressibleInterFoam and phase changes from interPhaseChangeFoam but, not working in same class of 'mixture' but seperate mixture classes.

In which OpenFOAM version are you trying to run this custom solver?
-> I have 2.3.1... I should try other versions...
kickflipin is offline   Reply With Quote

Old   May 1, 2015, 11:19
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,820
Blog Entries: 39
Rep Power: 108
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quote:
Originally Posted by kickflipin View Post
For which OpenFOAM version was the solver originally designed for?
-> I don't have answer for this question. But it seems to be the problem..
It's possible to deduce the version from the header section in the "*.C" files, based on the date written there.
For example, this:
Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
     \\/     M anipulation  |
-------------------------------------------------------------------------------
Implies that it's either OpenFOAM 2.3.x or OpenFOAM-dev, due to the date. Or at the very least, narrow down the possible versions.

---------------

edit: I've looked into your file "compressibleCavFoam.C" and it has this:
Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
     \\/     M anipulation  |
-------------------------------------------------------------------------------
Therefore, it's either been coded with OpenFOAM 2.2.1, 2.2.2 or 2.2.x.

Last edited by wyldckat; May 1, 2015 at 11:23. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   May 5, 2015, 05:11
Default
  #5
New Member
 
Woensug Eric Choi
Join Date: Apr 2015
Posts: 5
Rep Power: 3
kickflipin is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Therefore, it's either been coded with OpenFOAM 2.2.1, 2.2.2 or 2.2.x.
I tried 2.2.1, 2.2.2, 2.2.x following openfoamwiki.net's installation guide,
All three of them on Ubuntu 14.04

NONE of those versions could compile the solver.. i get errors saying as below..

Any help?? wrong compatibility with ubuntu 14.04?

Code:
+ wmake libso twoPhaseMixtureThermo
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file twoPhaseMixtureThermo.C
SOURCE=twoPhaseMixtureThermo.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/transportModels/compressible/lnInclude -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/thermophysicalModels/basic/lnInclude -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/transportModels/twoPhaseMixture/lnInclude -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64Gcc45DPOpt/twoPhaseMixtureThermo.o
twoPhaseMixtureThermo.C: In constructor ‘Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo(const Foam::fvMesh&)’:
twoPhaseMixtureThermo.C:52:27: error: ‘groupName’ is not a member of ‘Foam::IOobject’
         volScalarField T1(IOobject::groupName("T", phase1Name()), T_);
                           ^
twoPhaseMixtureThermo.C:57:27: error: ‘groupName’ is not a member of ‘Foam::IOobject’
         volScalarField T2(IOobject::groupName("T", phase2Name()), T_);
                           ^
make: *** [Make/linux64Gcc45DPOpt/twoPhaseMixtureThermo.o] error 1
+ wmake
Making dependency list for source file compressibleCavFoam.C
could not open file alphaControls.H for source file compressibleCavFoam.C
SOURCE=compressibleCavFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -ItwoPhaseMixtureThermo -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/transportModels/compressible/lnInclude -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/thermophysicalModels/basic/lnInclude -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/transportModels/twoPhaseMixture/lnInclude -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/transportModels/interfaceProperties/lnInclude -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/turbulenceModels/compressible/turbulenceModel -IphaseChangeTwoPhaseMixtures/lnInclude -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/eric/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64Gcc45DPOpt/compressibleCavFoam.o
In file included from compressibleCavFoam.C:99:0:
alphaEqnsSubCycle.H:2:31: fatal error: alphaControls.H: no such file or directory
     #include "alphaControls.H"
                               ^
compilation terminated.
make: *** [Make/linux64Gcc45DPOpt/compressibleCavFoam.o] error 1
kickflipin is offline   Reply With Quote

Old   May 5, 2015, 06:07
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,561
Rep Power: 26
alexeym will become famous soon enoughalexeym will become famous soon enough
Hi,

IObject::groupName method appeared in 2.3.x (at least I wasn't able to find the method in 2.2.x, 2.1.x, and 2.0.x repositories).

Also there is no src/finiteVolume/cfdTools/general/include/alphaControls.H file in 2.2.x and earlier. Again it is available in 2.3.x.

So I guess compressibleCavFoam.C was started in 2.2.x era, while the rest somehow was updated for 2.3.x branch.
alexeym is offline   Reply With Quote

Old   May 5, 2015, 06:10
Default
  #7
New Member
 
Woensug Eric Choi
Join Date: Apr 2015
Posts: 5
Rep Power: 3
kickflipin is on a distinguished road
Thx... still far from the original purpose... I just can't get it work.... feel like it was a problem of wrong problem settings for the case, not the problem of the solution itself @_@
kickflipin is offline   Reply With Quote

Old   May 5, 2015, 08:15
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,561
Rep Power: 26
alexeym will become famous soon enoughalexeym will become famous soon enough
Well,

If you try to build the solver (did you?), fix certain errors in Make/options (like missing -I$(LIB_SRC)/meshTools/lnInclude in EXE_INC or redefinition of rhoPhiSum in alphaEqnsSubCycle.H (lines 12 and 15)), build the solver with debug symbols, execute it in the case folder, you will get similar output :

Code:
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
#0  Foam::error::printStack(Foam::Ostream&) at printStack.C:277
#1  Foam::sigSegv::sigHandler(int) at sigSegv.C:53
#2  _sigtramp in /usr/lib/system/libsystem_platform.dylib
#3  (unresolved) in /usr/lib/system/libsystem_platform.dylib
#4  Foam::Field<double>::Field(Foam::Field<double> const&) at Field.C:201
#5  Foam::DimensionedField<double, Foam::volMesh>::DimensionedField(Foam::word const&, Foam::DimensionedField<double, Foam::volMesh> const&) at DimensionedField.C:207
#6  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::word const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at GeometricField.C:519
#7  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::word const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at GeometricField.C:535
#8  Foam::compressible::laminar::muEff() const at laminar.H:103
#9  Foam::compressible::laminar::divDevRhoReff(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const at laminar.C:223
#10  main at UEqn.H:6
#11  start in /usr/lib/system/libdyld.dylib
Now it you look inside laminar.H ($FOAM_SRC/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H), you will find that line 103 is:

Code:
return tmp<volScalarField>(new volScalarField("muEff", mu()))
where mu() is a method of compressible::turbulenceModel, which is just a call to mu method of thermophysicalModel_:

Code:
        const volScalarField& mu() const
        {
            return thermophysicalModel_.mu();
        }
in your case thermophysicalModel_ is mixture

Code:
    autoPtr<compressible::turbulenceModel> turbulence
    (
        compressible::turbulenceModel::New(rho, U, rhoPhi, mixture)
    );
and finally mixture is

Code:
    autoPtr<phaseChangeTwoPhaseMixture> mixture =
        phaseChangeTwoPhaseMixture::New(U, phi);
At this point I have decided to stop. You have got two variants of phaseChangeTwoPhaseMixture, which one is used... well, this is what you need to find out.
wyldckat likes this.
alexeym is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transient run continues from last time (when startover is desired) bongbang CFX 2 March 23, 2015 00:05
which edition of the solver does it choose to run? sharonyue OpenFOAM Running, Solving & CFD 1 November 24, 2014 07:51
Problem with parallel run of my solver based on pimpleDyMFoam o.kotsur OpenFOAM Running, Solving & CFD 0 October 6, 2013 03:44
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
HOW can I run a solver without installatiom waynezw0618 OpenFOAM Installation 1 December 12, 2007 01:39


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