Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The documentation for `AdditiveFOAM` is hosted on [GitHub Pages](https://ornl.gi
|-----------------------------------------------------------|------------------------------------------|
| [solver](applications/solvers/additiveFoam) | Development version of the solver |
| [tutorials](tutorials) | Tutorial cases |
| [calibration utility](bin/calibrateHeatSource) | Heat-source calibration command |
| [calibration tutorial](tutorials/heatSourceCalibration) | Projected heat-source calibration workflow |

## Installation
[![OpenFOAM-14](https://img.shields.io/badge/OpenFOAM-14-blue.svg)](https://github.com/OpenFOAM/OpenFOAM-14)
Expand Down Expand Up @@ -42,8 +44,28 @@ script from the repository root:
./Allwmake
```

For regular use, source both environments in each new shell or add them to your
shell startup file:
The Python utilities require Python 3.10 or newer. To use a dedicated virtual
environment, create it and install the pinned dependencies from the repository
root:

```sh
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
python -m pip check
calibrateHeatSource --help
```

To use an existing Python environment instead, activate that environment and
install the same requirements into it:

```sh
python -m pip install -r /path/to/AdditiveFOAM/requirements.txt
python -m pip check
```

The AdditiveFOAM environment does not create or activate a Python environment.
Source the OpenFOAM and AdditiveFOAM environments in each new shell:

```sh
source /path/to/OpenFOAM-14/etc/bashrc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ bool Foam::functionObjects::meltPoolDimensions::execute()
// physical boundary : take face point if above iso value
const vectorField& Cf = mesh_.Cf().boundaryField()[patchi];

const scalarField& pif(TPf.patchInternalField());
const scalarField pif(TPf.patchInternalField());

forAll(faceCells, facei)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ Foam::absorptionModels::Kelly::Kelly
etaMin_("etaMin", dimless, absorptionModelCoeffs_),
aspectRatioSwitch_
(
absorptionModelCoeffs_.lookupOrDefault<scalar>
max
(
"aspectRatioSwitch",
1.0
absorptionModelCoeffs_.lookupOrDefault<scalar>
(
"aspectRatioSwitch",
1.0
),
scalar(1e-10)
)
)
{
Expand Down Expand Up @@ -116,12 +120,15 @@ bool Foam::absorptionModels::Kelly::read()
absorptionModelCoeffs_.lookup("geometry") >> geometry_;
absorptionModelCoeffs_.lookup("eta0") >> eta0_;
absorptionModelCoeffs_.lookup("etaMin") >> etaMin_;
aspectRatioSwitch_ =
aspectRatioSwitch_ = max
(
absorptionModelCoeffs_.lookupOrDefault<scalar>
(
"aspectRatioSwitch",
1.0
);
),
scalar(1e-10)
);

return true;
}
Expand Down
Loading
Loading