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

Compiling meltFoam solver

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 21, 2015, 20:41
Default Compiling meltFoam solver
  #1
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 12
Rep Power: 2
mick223 is on a distinguished road
Hi,

I'm having a lot of trouble compiling the meltFoam solver, used for modelling melting and solidification. I have been using the wclean then wmake all tools, however I am repeatedly getting the error that /opt/openfoam240/src/finiteVolume/lnInclude/cyclicAMIFvPatch.H:39:35: fatal error: cyclicAMILduInterface.H: No such file or directory
#include "cyclicAMILduInterface.H"

This comes after a string of other files being included from /opt.
Does anyone have a way to get around this error?

The terminal readout is attached.

Thank you.
Attached Images
File Type: jpg Screenshot from 2015-07-22 10:38:48.jpg (22.9 KB, 10 views)
mick223 is offline   Reply With Quote

Old   July 22, 2015, 03:11
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,133
Rep Power: 20
alexeym will become famous soon enoughalexeym will become famous soon enough
Hi,

Code:
$ cd $FOAM_SRC
$ find . -name 'cyclicAMILduInterface.H'
./meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterface.H
./meshTools/lnInclude/cyclicAMILduInterface.H
do you have

Code:
-I$(LIB_SRC)/meshTools/lnInclude
line as a part of EXE_INC in your Make/options?
alexeym is offline   Reply With Quote

Old   July 22, 2015, 23:32
Default
  #3
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 12
Rep Power: 2
mick223 is on a distinguished road
Thanks Alexeym,

I downloaded a different copy of meltFoam from this site that included
Code:
-I$(LIB_SRC)/meshTools/lnInclude
and now the compilation has worked successfully, as far as I can tell.

Now I am having the issue that, upon running the meltFoam test case, I am getting the error:

Code:
--> FOAM FATAL IO ERROR: 
Unknown patchField type buoyantPressure for patch type wall

Valid patchField types are :

62
(
advective
calculated
codedFixedValue
codedMixed
cyclic
cyclicACMI
cyclicAMI
cyclicSlip
directionMixed
empty
externalCoupled
fan
fanPressure
fixedFluxPressure
fixedGradient
fixedInternalValue
fixedJump
fixedJumpAMI
fixedMean
fixedPressureCompressibleDensity
fixedValue
freestream
freestreamPressure
inletOutlet
inletOutletTotalTemperature
mapped
mappedField
mappedFixedInternalValue
mappedFixedPushedInternalValue
mixed
nonuniformTransformCyclic
oscillatingFixedValue
outletInlet
outletMappedUniformInlet
partialSlip
phaseHydrostaticPressure
prghPressure
processor
processorCyclic
rotatingTotalPressure
sliced
slip
symmetry
symmetryPlane
syringePressure
timeVaryingMappedFixedValue
totalPressure
totalTemperature
turbulentInlet
turbulentIntensityKineticEnergyInlet
uniformDensityHydrostaticPressure
uniformFixedGradient
uniformFixedValue
uniformInletOutlet
uniformJump
uniformJumpAMI
uniformTotalPressure
variableHeightFlowRate
waveSurfacePressure
waveTransmissive
wedge
zeroGradient
)
Do I have to go back to compilation and add more libraries, or is this another kind of issue? I'm new to OpenFOAM, so sorry if these are simple errors.

Thanks again.
mick223 is offline   Reply With Quote

Old   July 23, 2015, 01:38
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,133
Rep Power: 20
alexeym will become famous soon enoughalexeym will become famous soon enough
Hi,

In 2.3.0 buoyantPressure BC was removed in favor of fixedFluxPressure. See tutorial examples in tutorials/heatTransfer/buoyantBoussinesqPimpleFoam (since meltFoam is just derivative of buoyantBoussinesqPimpleFoam with Darcy term in momentum equation and solidification path in temperature equation).
alexeym is offline   Reply With Quote

Old   July 23, 2015, 06:50
Default
  #5
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 12
Rep Power: 2
mick223 is on a distinguished road
Ok, so by changing to fixedFluxPressure it progressed past where it got stuck last time, however now it is getting to the transportProperties and giving the erro:

Code:
--> FOAM FATAL IO ERROR: 
keyword cps is undefined in dictionary "/home/mick223/OpenFOAM/mick223-2.4.0/run/meltfoam_tutorial/constant/transportProperties"

file: /home/mick223/OpenFOAM/mick223-2.4.0/run/meltfoam_tutorial/constant/transportProperties from line 18 to line 35.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 442.

FOAM exiting
As far as I can see the cpS is defined in the file, so I can't see why this is happening.
Thanks
mick223 is offline   Reply With Quote

Old   July 23, 2015, 06:56
Default
  #6
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 179
Rep Power: 3
ssss is on a distinguished road
cpS or cps? Be careful with the lower and upper cases
ssss is offline   Reply With Quote

Old   July 23, 2015, 07:22
Default
  #7
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 12
Rep Power: 2
mick223 is on a distinguished road
Changing it from cpS to cps seems to have worked, although other transportProperties files I have seen always keep it as cpS. Now I am getting

Code:
--> FOAM FATAL IO ERROR: 
keyword mu is undefined in dictionary "/home/mick223/OpenFOAM/mick223-2.4.0/run/meltfoam_tutorial/constant/transportProperties"

file: /home/mick223/OpenFOAM/mick223-2.4.0/run/meltfoam_tutorial/constant/transportProperties from line 18 to line 35.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 442.

FOAM exiting
Which I cannot solve as easily, because there is no mu in the transport properties file.
mick223 is offline   Reply With Quote

Old   July 23, 2015, 07:37
Default
  #8
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 179
Rep Power: 3
ssss is on a distinguished road
It is as easy as adding a new entry to your transportProperties with the name, value and dimensions of mu (dynamic viscosity)
ssss is offline   Reply With Quote

Old   July 23, 2015, 08:20
Default
  #9
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,133
Rep Power: 20
alexeym will become famous soon enoughalexeym will become famous soon enough
Hi,

I think it would be easier for everybody if you post link to the code. Meaning of mu could be dynamic viscosity (as ssss proposed) or anything else (as author of the code supposed).
alexeym is offline   Reply With Quote

Old   July 24, 2015, 01:33
Default
  #10
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 12
Rep Power: 2
mick223 is on a distinguished road
Ok, here is the transportProperties file from the meltFoam tutorial, I have left it as it was originally before changing the cpS etc to lower case. Header has been omitted. To me it seems strange that it would need me to put mu in, as laminar liquid and solid viscosity are already defined.

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

rho             rho [1 -3 0 0 0 0 0] 6093;

//liquid phase
cpL             cpL [0 2 -2 -1 0 0 0] 381.5;
lambdaL         lambdaL [1 1 -3 -1 0 0 0] 32;
nuL             nuL [0 2 -1 0 0 0 0] 2.97e-07;

//solid phase
cpS             cpS [0 2 -2 -1 0 0 0] 381.5;
lambdaS         lambdaS [1 1 -3 -1 0 0 0] 32;
nuS             nuS [0 2 -1 0 0 0 0] 2.97e-07;

Ts              Ts [0 0 0 1 0 0 0] 302.43;
Tl              Tl [0 0 0 1 0 0 0] 303.43;
hs              hs [0 2 -2 0 0 0 0] 80160;
beta            beta [0 0 0 -1 0 0 0] 1.2e-4;
DCl             DCl [0 0 -1 0 0 0 0] 1.6e06;
DCs             DCs [0 0 0 0 0 0 0] 1e-03;


// ************************************************************************* //
mick223 is offline   Reply With Quote

Old   July 28, 2015, 20:48
Default
  #11
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 12
Rep Power: 2
mick223 is on a distinguished road
Ok, so having had no luck replaced the nuS and nuL values with mu (as they were both the same), I continued encountering errors as it asked for parameters with different names than what the meltFoam tutorial had. I am retrying the compilation with a different version of the solver, and am getting the error:

Code:
mick223@mick223-H81M-S2H:~/OpenFOAM/mick223-2.4.0/run/meltFoam$ wmake
Making dependency list for source file meltFoam.C
SOURCE=meltFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam240/src/sampling/lnInclude -I/opt/openfoam240/src/meshTools/lnInclude -I/opt/openfoam240/src/fvOptions/lnInclude -I/opt/openfoam240/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam240/src/OpenFOAM/lnInclude -I/opt/openfoam240/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/meltFoam.o
In file included from meltFoam.C:83:0:
pEqn.H: In function ‘int main(int, char**)’:
pEqn.H:8:11: error: ‘ddtPhiCorr’ is not a member of ‘Foam::fvc’
         + fvc::ddtPhiCorr(rAU, U, phi);
           ^
In file included from meltFoam.C:56:0:
/opt/openfoam240/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
 scalar maxDeltaT =
        ^
meltFoam.dep:692: recipe for target 'Make/linux64GccDPOpt/meltFoam.o' failed
make: *** [Make/linux64GccDPOpt/meltFoam.o] Error 1
mick223@mick223-H81M-S2H:~/OpenFOAM/mick223-2.4.0/run/meltFoam$
Is this a result of including libraries not necessary, or has the new version of OpenFOAM made previous libraries redundant/incorrect?

Thanks.
mick223 is offline   Reply With Quote

Old   July 31, 2015, 04:08
Default No need to fiddle about the code
  #12
Senior Member
 
fabian_roesler's Avatar
 
Fabian Roesler
Join Date: Mar 2009
Location: Bad Friedrichshall, Germany
Posts: 167
Rep Power: 8
fabian_roesler is on a distinguished road
You can't just remove the kinematic viscosity from the transport properties. The solver is incompressible and thus uses nu instead of mu. the new boundary condition fixedFluxPressure seems to need dynamic viscosity. So what?
Just add mu as second viscosity by multiplying nu with rho, which is also constant and the same value for both phases, to the transport properties. You don't have to change the code but are welcome to do so and post a version for OF 2.4.x

Cheers

Fabian
fabian_roesler is offline   Reply With Quote

Old   July 31, 2015, 10:33
Default
  #13
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 12
Rep Power: 2
mick223 is on a distinguished road
Thanks for the advice. As it stands I've installed OF2.2.2 so as to be able to use the meltFoam solver and case files I need, which is working so far. The issue I was having before was not limited to the case file and was a result of the changes to OF since the meltFoam solver I was using was posted, these changes including the transition from ddtPhiCorr to ddtCorr in the solver, as well as others I was not able to fix.

I'm new to OF but I'll revisit trying to get it to work on 2.4.x once I've finished the current project.

Thanks again,
Mick.
mick223 is offline   Reply With Quote

Reply

Tags
compilation error, meltfoam

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
Floating Point Exception Error nyox FLUENT 6 August 23, 2014 23:38
problem about compiling meltFoam wumin OpenFOAM Programming & Development 3 February 28, 2014 02:55
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
Problems about compiling a new solver fw407 OpenFOAM Running, Solving & CFD 1 December 27, 2007 14:52
Problems about compiling a new solver fw407 OpenFOAM Bugs 0 December 23, 2007 18:03


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