Skip to content

Commit

Permalink
Add sedveg solver
Browse files Browse the repository at this point in the history
  • Loading branch information
remichassagne committed Jan 23, 2024
1 parent 29de0f1 commit 51e9827
Show file tree
Hide file tree
Showing 73 changed files with 2,976 additions and 0 deletions.
29 changes: 29 additions & 0 deletions mysolvers/fluidsimfoam-sedveg/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2024, Fluidsimfoam developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 changes: 12 additions & 0 deletions mysolvers/fluidsimfoam-sedveg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Solver fluidsimfoam-sedveg

## Installation

First install [fluidsimfoam] (see
https://fluidsimfoam.readthedocs.io/en/latest/install.html). Then:

```sh
pip install -e .
```

[fluidsimfoam]: https://foss.heptapod.net/fluiddyn/fluidsimfoam
26 changes: 26 additions & 0 deletions mysolvers/fluidsimfoam-sedveg/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[build-system]
requires = [
"setuptools>=61.0.0",
"wheel",
]
build-backend = "setuptools.build_meta"

[project]
name = "fluidsimfoam-sedveg"
authors = [
{name = "Fluidsimfoam developers"},
]
description = "???"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "BSD-3-Clause"}
version = "0.0.1"
dependencies = [
"fluidsimfoam >= 0.0.7",
]

[project.entry-points."fluidsimfoam.solvers"]
sedveg = "fluidsimfoam_sedveg"

[tool.setuptools.package-data]
fluidsimfoam_sedveg = ["templates"]
17 changes: 17 additions & 0 deletions mysolvers/fluidsimfoam-sedveg/scripts/launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import numpy as np
from fluidsimfoam_sedveg import Simul

params = Simul.create_default_params()

params.output.sub_directory = "doc_fluidsimfoam/sedveg"
params.short_name_type_run = "tuto"

params.control_dict.end_time = 2
params.control_dict.write_interval = 1
params.constant.twophase_ras.sus = 1

# create a simulation directory
sim = Simul(params)

# start the simulation
sim.make.exec("run")
19 changes: 19 additions & 0 deletions mysolvers/fluidsimfoam-sedveg/src/fluidsimfoam_sedveg/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from fluidsimfoam.info import InfoSolver
from fluidsimfoam.solvers.base import SimulFoam

__all__ = ["Simul"]


class InfoSolverSedveg(InfoSolver):
def _init_root(self):
super()._init_root()
self.module_name = "fluidsimfoam_sedveg"
self.class_name = "Simul"
self.short_name = "sedveg"

self.classes.Output.module_name = "fluidsimfoam_sedveg.output"
self.classes.Output.class_name = "OutputSedveg"


class Simul(SimulFoam):
InfoSolver = InfoSolverSedveg
Loading

0 comments on commit 51e9827

Please sign in to comment.