Building swak4Foam with blueCFD Core - blueCFD/Core GitHub Wiki

Description

This wiki page provides information on how to download and build swak4Foam with blueCFD-Core 2016 and 2017.

Please keep in mind that our port of swak4Foam must be used in order to properly compile with blueCFD-Core, due to several changes that were done when porting OpenFOAM to Windows.

For any problems compiling swak4Foam with blueCFD-Core, please report it here: https://github.com/blueCFD/Core/issues

Topics:

Building with blueCFD-Core 2016

WARNING: These instructions were not tested with blueCFD-Core 2016-1, they were only confirmed to work with blueCFD-Core 2016-2.

Follow these steps to download and build swak4Foam with blueCFD-Core 2016-2:

  1. Set-up the build environment as documented here: Work environment for blueCFD-Core 2016-2 and 2017 - and start the blueCFD-Core terminal, as instructed there.

  2. Run the following command, to switch to the default OpenFOAM-assigned user folder:

    user
    
  3. Download the source code of our port for swak4Foam by running:

    git clone https://github.com/blueCFD/swak4Foam-dev.git swak4Foam -b blueCFD-Core-2016
    
  4. Then go into the downloaded source code folder by running:

    cd swak4Foam
    
  5. Optional: Turn on Python support in swak4Foam by running:

    cp swakConfiguration.blueCFD-Core swakConfiguration
    
  6. Optional: Choose to use all cores in your machine to build swak4Foam, although it might need a lot of RAM (roughly 2GB per core):

    wmMC
    
  7. Build swak4Foam by running:

    ./Allwmake > log.make 2>&1
    
    • It takes around 40 minutes to build with 4 cores on an i5-6600.

    • Optional: If you using more than one core are running it again, to overcome some multi-core racing conditions:

      ./Allwmake > log.make 2>&1
      
  8. Run it again, to get a summary of the build:

    ./Allwmake
    
  9. If all goes well, it should show the following output:

    Previously compiled for OpenFOAM (4.x)
    Reading variables from 'swakConfiguration'
    Checking swak4Foam-version and generating file
    Swak version is 0.4.2
    Bison is version 3.0.4
    Flex is version 2.6.0 (Minor version: 0)
    OpenFOAM-version: Major 4 Minor 0 Patch 0 (-1 == x / 0) Fork: openfoam
    No change to swak4FoamParsers/foamVersion4swak.H
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswak4FoamParsers.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakLagrangianParser.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libgroovyBC.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakFunctionObjects.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libsimpleFunctionObjects.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libsimpleLagrangianFunctionObjects.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libsimpleSearchableSurfaces.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libsimpleSwakFunctionObjects.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakTopoSources.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakDynamicMesh.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakSourceFields.dll' is up to date.
    Compiling swakFvOptions
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakFvOptions.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakStateMachine.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libgroovyStandardBCs.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakPythonIntegration.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakChemistryModelFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakDynamicMeshFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakFvcSchemesFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakLagrangianCloudSourcesFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakLocalCalculationsFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakMeshQualityFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakMeshWaveFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakMRFFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakQuantileFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakRadiationModelFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakRandomFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakShiftFieldFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakSurfacesAndSetsFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakThermoTurbFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakTransportTurbFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakVelocityFunctionPlugin.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakCoalCloudAdaptor.dll' is up to date.
    
    If you have your own function-plugins you can specify them using the SWAK_USER_PLUGINS environment variable and they would be compiled now. If you don't know what this means: don't bother. You propably don't need it
    
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libsimpleCloudFunctionObjects.dll' is up to date.
    '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/lib/libswakCloudFunctionObjects.dll' is up to date.
    make[1]: Entering directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/calcNonUniformOffsetsForMapped'
    make[1]: '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/calcNonUniformOffsetsForMapped.exe' is up to date.
    make[1]: Leaving directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/calcNonUniformOffsetsForMapped'
    make[1]: Entering directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/fieldReport'
    make[1]: '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/fieldReport.exe' is up to date.
    make[1]: Leaving directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/fieldReport'
    make[1]: Entering directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkyDoCalc'
    make[1]: '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/funkyDoCalc.exe' is up to date.
    make[1]: Leaving directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkyDoCalc'
    make[1]: Entering directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkyPythonPostproc'
    make[1]: '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/funkyPythonPostproc.exe' is up to date.
    make[1]: Leaving directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkyPythonPostproc'
    make[1]: Entering directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkySetBoundaryField'
    make[1]: '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/funkySetBoundaryField.exe' is up to date.
    make[1]: Leaving directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkySetBoundaryField'
    make[1]: Entering directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkySetFields'
    make[1]: '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/funkySetFields.exe' is up to date.
    make[1]: Leaving directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkySetFields'
    make[1]: Entering directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkySetLagrangianField'
    make[1]: '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/funkySetLagrangianField.exe' is up to date.
    make[1]: Leaving directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkySetLagrangianField'
    make[1]: Entering directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkyWarpMesh'
    make[1]: '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/funkyWarpMesh.exe' is up to date.
    make[1]: Leaving directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/funkyWarpMesh'
    make[1]: Entering directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/replayTransientBC'
    make[1]: '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/replayTransientBC.exe' is up to date.
    make[1]: Leaving directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/replayTransientBC'
    make[1]: Entering directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/writeBoundarySubfields'
    make[1]: '/home/ofuser/blueCFD/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/writeBoundarySubfields.exe' is up to date.
    make[1]: Leaving directory '/home/ofuser/blueCFD/ofuser-of4/swak4Foam/Utilities/writeBoundarySubfields'
    
    
    If you want to use swakCoded-function object or compile software based on swak set the environment variable SWAK4FOAM_SRC to /home/ofuser/blueCFD/ofuser-of4/swak4Foam/Libraries (most people will be fine without setting that variable)
    
    1. If your run does not show an output similar to the above, then please run:
    gzip < log.make > log.make.gz
    
    1. Then create a new report here: https://github.com/blueCFD/Core/issues - and attach the file log.make.gz to your report.

Building with blueCFD-Core 2017

Follow these steps to download and build swak4Foam with blueCFD-Core 2017:

  1. Set-up the build environment as documented here: Work environment for blueCFD-Core 2016-2 and 2017 - and start the blueCFD-Core terminal, as instructed there.

  2. Run the following command, to switch to the default OpenFOAM-assigned user folder:

    user
    
  3. Download the source code of our port for swak4Foam by running:

    git clone https://github.com/blueCFD/swak4Foam-dev.git swak4Foam -b blueCFD-Core-2017
    
  4. Then go into the downloaded source code folder by running:

    cd swak4Foam
    
  5. Optional: Turn on Python support in swak4Foam by running:

    cp swakConfiguration.blueCFD-Core swakConfiguration
    
  6. Optional: Choose to use all cores in your machine to build swak4Foam, although it might need a lot of RAM (roughly 2GB per core):

    wmMC
    
  7. Build swak4Foam by running:

    ./Allwmake > log.make 2>&1
    
    • It takes around 40 minutes to build with 4 cores on an i5-6600.

    • Optional: If you using more than one core are running it again, to overcome some multi-core racing conditions:

      ./Allwmake > log.make 2>&1
      
  8. Run it again, to get a summary of the build:

    ./Allwmake
    
  9. If all goes well, it should show the following output:

    Previously compiled for OpenFOAM (5.x)
    Reading variables from 'swakConfiguration'
    Checking swak4Foam-version and generating file
    Swak version is 0.4.2
    Bison is version 3.0.4
    Flex is version 2.6.4 (Minor version: 4)
    OpenFOAM-version: Major 5 Minor 0 Patch 0 (-1 == x / 0) Fork: openfoam
    No change to swak4FoamParsers/foamVersion4swak.H
    wmake libso swak4FoamParsers
    wmake libso swakLagrangianParser
    wmake libso groovyBC
    wmake libso swakFunctionObjects
    wmake libso simpleFunctionObjects
    wmake libso simpleLagrangianFunctionObjects
    wmake libso simpleSearchableSurfaces
    wmake libso simpleSwakFunctionObjects
    wmake libso swakTopoSources
    wmake libso swakDynamicMesh
    wmake libso swakSourceFields
    Compiling swakFvOptions
    wmake libso swakFvOptions
    wmake libso swakStateMachine
    wmake libso groovyStandardBCs
    wmake libso swakPythonIntegration
    wmake libso swakChemistryModelFunctionPlugin
    wmake libso swakDynamicMeshFunctionPlugin
    wmake libso swakFvcSchemesFunctionPlugin
    wmake libso swakLagrangianCloudSourcesFunctionPlugin
    wmake libso swakLocalCalculationsFunctionPlugin
    wmake libso swakMeshQualityFunctionPlugin
    wmake libso swakMeshWaveFunctionPlugin
    wmake libso swakMRFFunctionPlugin
    wmake libso swakQuantileFunctionPlugin
    wmake libso swakRadiationModelFunctionPlugin
    wmake libso swakRandomFunctionPlugin
    wmake libso swakShiftFieldFunctionPlugin
    wmake libso swakSurfacesAndSetsFunctionPlugin
    wmake libso swakThermoTurbFunctionPlugin
    wmake libso swakTransportTurbFunctionPlugin
    wmake libso swakVelocityFunctionPlugin
    wmake libso coalCloudAdaptor
    
    If you have your own function-plugins you can specify them using the SWAK_USER_PLUGINS environment variable and they would be compiled now. If you don't know what this means: don't bother. You propably don't need it
    
    wmake libso simpleCloudFunctionObjects
    wmake libso swakCloudFunctionObjects
    wmake calcNonUniformOffsetsForMapped
    wmake fieldReport
    wmake funkyDoCalc
    wmake funkyPythonPostproc
    wmake funkySetAreaFields
    wmake funkySetBoundaryField
    wmake funkySetFields
    wmake funkySetLagrangianField
    wmake funkyWarpMesh
    wmake replayTransientBC
    wmake writeBoundarySubfields
    
    
    If you want to use swakCoded-function object or compile software based on swak set the environment variable SWAK4FOAM_SRC to /home/ofuser/blueCFD/ofuser-of5/swak4Foam/Libraries (most people will be fine without setting that variable)
    
    1. If your run does not show an output similar to the above, then please run:
    gzip < log.make > log.make.gz
    
    1. Then create a new report here: https://github.com/blueCFD/Core/issues - and attach the file log.make.gz to your report.
⚠️ **GitHub.com Fallback** ⚠️