feelpp / toolbox Goto Github PK
View Code? Open in Web Editor NEW:hammer: Feel++ Toolbox Examples
Home Page: https://feelpp.github.io/toolbox/
License: GNU General Public License v3.0
:hammer: Feel++ Toolbox Examples
Home Page: https://feelpp.github.io/toolbox/
License: GNU General Public License v3.0
Is your feature request related to a problem ? Please describe.
Lots of industrial problems require loading data from datafiles and use interpolation to fit the data.
Describe the solution you'd like
use fit interpolation feature of feel++ to add json files.
Additional context
request comes from a ECMI 2018 conference participant
Is your feature request related to a problem ? Please describe.
Would it be possible to have C++ or Python codes as inputs for Feel++ apps in MSO4SC
Describe the solution you'd like
Instead of case
option we would use a script/code option which would then be executed by the feel++ app
Describe alternatives you've considered
Additional context
This was discussed with an ECMI 2018 participant
We want to develop a toolbox for fluid seepage through porous media in 2D and 3D using the work already done for the Poisson problems.
One of the aims is to be able to solve Stokes-Darcy and Navier-Stokes-Darcy coupled problems within the context of blood perfusion through the brain.
The toolbox should be a subclass of the HDG Poisson.
this is related to feelpp/feelpp#1457
add the documentation in the toolbox repo
Is your feature request related to a problem ? Please describe.
For many problems, it may be useful in a first approximation to consider 2D Axi geometries and formulation. Common examples may be found in physics textbooks.
Describe the solution you'd like
It would be great to have a 2D axi version for each toolbox.
Additional context
Special care shall be taken for PDE with vectorial unknows.
The opus testcase needs to be added to the toolbox benchmarks, we have some results to compare with in some cases (with Comsol)
We would like to enable coupling between a free fluid model and a fluid flow through porous media using existing CFD and soon existing HDG Darcy toolboxes.
We gather at ECMI 2018 user stories to improve our Feel++ apps and pilots as well as the userexperience
Is your feature request related to a problem ? Please describe.
thermo-electric-fluid toolbox would be nice to have in many industrials applications
Additional context
Request from a ECMI participant
SZE have created various testcases/examples to use Feel++ CFD and CSM toolboxes. This needs to be added to Feel++.
add thermal building example
In this example, we consider a solenoid conductor with finite thickness and infinite length.
This allow us to ignore the z components in our equations.
We admit that there is only a radial expansion.
The conductor
The geometry also contains an external domain which is an approximation of
Name | Description | Value | Unit |
---|---|---|---|
internal radius | m | ||
external radius | m | ||
dz~ | height | m |
current density:
magnetic field:
From the momentum conservation equation, we have:
[
div\sigma+\textbf{j}\times\textbf{b}=0
]
With the hypothesys specified in introduction, this equation may be rewritten :
[
-\sigma_{\theta}+\frac{\partial}{\partial r}(r\sigma_{r})=-rj_{\theta}b_{z}
]
For a solenoid conductor with finite thickness and infinite length, we have for a constant current density
[
b_{z} = ...
]
With these hypothesys, we can show that (see [REF002]):
[
u_{r} = ...
]
toolbox: elasticity
|Name |Description | Value | Unit |
|$E$ |Young modulus||$128.10^{9}$|$Pa=kg.m^{-1} .s^{-2}$|
|$\nu$|Poisson's ratio|0.33|- |
The output is describe the output set of the example
add scalar vectorial and matricial fields to be visualized
add measures, scalar quantities, mean values, performance metrics
Describe Benchmark type:
[X] Verification
[] Validation
[] Performance
The computed values of the displacements on r-axis in the solenoidal mid-plane are compared
with the analytical expression given by Montgomery.
we have examples
and benchmarks
, I am thinking that it might be best to actually merge them into cases
or examples
and have Feel++ Cases Guide. Then we would need to identify the benchmarks (which are just a subset of a case or example, they provide verification,validation or scalability checks) in each modules in a specific section. That way we gather all examples in one place and don’t have to remember whether it is a benchmark or an example
Another side effect is that we show more examples in one go for each toolbox (edited)
Yet another advantage is that it simplifies the documentation and avoid duplication between example and benchmark templates
@vincentchabannes what do you think ?
simulate a Stokes flow in a pipe with a poiseuille inflow
the geometry is a 2D pipe with length L=5 and height H=1
The input parameters can be the
constant set to eg. blood viscosity
First case
velocity and pressure
l2 norm of error with respect to exact solution
this is a Verification benchmark
Is your feature request related to a problem ? Please describe.
When a end-user is reading the documentation, he may want to execute the case or have access to the case
string to pass to MSO4SC
Describe the solution you'd like
To facilitate the usage, we can provide a copy to clipboard
button that allows to retrieve either the command line or the case
option
we may use https://clipboardjs.com/ and add it to supplemental-ui
. it is small and seems to fit the bill.
Also we need to
In this example, we will estimate the rise in temperature due to Joules losses in a stranded conductor. An electrical potential
The geometry of the conductor is choosen as to have an analytical expression for the temperature.
Name | Description | Value | Unit |
---|---|---|---|
internal radius | m | ||
external radius | m | ||
dz~ | height | m |
Name | Description | Value | Unit |
---|---|---|---|
electrical potential | 0.3 | V |
In our geometry and owing to the considered thermal boundary conditions,
We can show that the
[
T=-a \log(\frac{r}{r_{0}})^{2} + T_{max}
]
with:
$a=sigma/(2k)(V0/(2*pi))**2$
$b=k*(1/(h1r1)+1/(h2r2))+log(r2/r1)$
$c=log(r2/r1)log(r2r1)+2k(log(r1)/(h1r1)+log(r2)/(h2r2))$
$r0=exp( ((Tw2-Tw1)/b+ac/b)/(2a) )$
[Tm = 2ak/(h1r1+h2r2)log(r2/r1)
+ (h1r1Tw1+h2r2Tw2)/(h1r1+h2r2)
+ a(h1r1log(r1/r0)**2+h2r2log(r2/r0)**2)/(h1r1+h2r2)
]
toolbox: thermoelectric
Name | Description | Value | Unit |
---|---|---|---|
electrical conductivity | |||
k | thermal conductivity | 380 |
The boundary conditions for the electrical probleme are introduced as simple Dirichlet boundary conditions for the electric potential on the entry/exit of the conductor. For the remaining faces, as no current is flowing througth these faces, we add Homogeneous Neumann conditions.
Name | Description | Value | Unit |
---|---|---|---|
electrical potential | 0. | V | |
electrical potential | V_0*f | V |
where
As for the heat equation, the forced water cooling is modeled by robin boundary condition with
Name | Description | Value | Unit |
---|---|---|---|
coolant temperature on r |
293 | K | |
coolant temperature on r |
293 | K | |
heat transfer coefficient on r~1 | |||
heat transfer coefficient on r~1 | 80000 |
The output is describe the output set of the example
add scalar vectorial and matricial fields to be visualized
add measures, scalar quantities, mean values, performance metrics
Describe Benchmark type:
[X] Verification
[] Validation
[] Performance
The computed values of the temperature are compared with the analytical expression given above for several mesh sizes.
this is in angiotk repo
In this example, we will compute the magnetic field generated by a stranded conductor.
The geometry of the conductor is chosen such that we can derive the analytical expression
of the magnetic field.
The conductor stem:[\Omega] consists in a rectangular cross-section torus.
The geometry also contains an external domain which is an approximation of stem:[\mathbf{R}^3/\Omega].
Name | Description | Value | Unit |
---|---|---|---|
stem:[r_1] | internal radius | stem:[1.10^{-3}] | m |
stem:[r_2] | external radius | stem:[2.10^{-3}] | m |
stem:[dz] | height | stem:[2.10^{-3}] | m |
current density: stem:[\mathtbf{j}] in stem:[A/m^2].
Then it follows that the magnetic field stem:[\mathbf{B}], defined as the curl of stem:[\mathtbf{A}], is:
[stem]
++++
\mathbf{B}(\mathbf{r})=\frac{\mu_{0}}{4\pi}\int_{\Omega_{cond}}\frac{\mathbf{j}(\mathtbf{r'})\times(\mathbf{r}-\mathbf{r'})}{|\mathbf{r}-\mathbf{r'}|^{3}} d\mathbf{r'}\qquad\forall\mathbf{r}\in\Omega_{mgn}
++++
This is the so-called Biot & Savart's law.
For simple conductor geometry, analytical expressions of the magnetic field may be found in physics textbooks.
As a classical result, we have the following expression for a "solenoidal" conductor with a constant current density
distribution for the magnetic field along the Z-Axis:
xxxxx
The output is described the output set of the example
add scalar vectorial and matricial fields to be visualized
add measures, scalar quantities, mean values, performance metrics
Describe Benchmark type:
[X] Verification
[] Validation
[] Performance
The computed values of the magnetic field on the Z-Axis is compared with the analytical expression given above
for several mesh sizes.
the example is in angiotk repo
This case fails using
feelpp_toolbox_fluid --case "github:{repo:toolbox, branch:master, path:examples/modules/cfd/examples/spring_cfd}"
The mesh is missing (it should be downloaded from girder).
Is your feature request related to a problem ? Please describe.
In Hifimagnet the field of concern is more the current density (conductivity times electric field) than the electric field itself.
It would be great to be able to export it.
Describe the solution you'd like
Add current-density
to the list of exported fields.
Describe alternatives you've considered
Since the conductivity and the electric field can be exported, we could compute ourselves the current density.
Additional context
I started implementing it from the same model than the electric field, with a member to store it and a function updateCurrentDensity()
.
For the linear case, there is no issue, but in the non linear case, the conductivity depending on the temperature, it is the thermoelectric toolbox that should handle this.
Possible fix:
updateCurrentDensity
function and pass the temperature as a parameterelectric::updateCurrentDensity
does nothing if it depends on the temperature and the thermoelectric toolbox has its own function to do it.What is the best solution ?
@vincentchabannes @Trophime
We need to describe the process of contributing an example or benchmark:
add Chorus AIRBUS testcase to feelpp/toolbox
Is your feature request related to a problem ? Please describe.
we should support embedded graph plot to add for example convergence graphs and outputs plots
Describe the solution you'd like
plotly.js is a nice framework to embed graphics in html page
this can be easily supported in antora framework
Describe the bug
test case fails in singularity on atlas
To Reproduce
Steps to reproduce the behavior:
Reading /feel/downloads/feelpp_toolbox_solid/cases/rotating-winch/biele.cfg...
[ Starting Feel++ ] application feelpp_toolbox_solid version 0.105.0-rc.10 date 2018-Jun-12
. feelpp_toolbox_solid files are stored in /feel/toolboxes/solid/rotating-winch/biele/P2/np_1
.. logfiles :/feel/toolboxes/solid/rotating-winch/biele/P2/np_1/logs
[modelProperties] Loading Model Properties : "/feel/downloads/feelpp_toolbox_solid/cases/rotating-winch/biele.json"
[loadMesh] Loading Gmsh compatible mesh: "/feel/downloads/feelpp_toolbox_solid/cases/rotating-winch/biele.msh"
[loadMesh] Loading Gmsh compatible mesh: "/feel/downloads/feelpp_toolbox_solid/cases/rotating-winch/biele.msh" done
F0612 06:48:46.079028 42072 nullspace.cpp:128] Check failed: this->hasOrthonormalBasisVectors() basis vectors are not orthonormal
*** Check failure stack trace: ***
@ 0x7fdb4b3d9acc google::LogMessageFatal::~LogMessageFatal()
@ 0x7fdb5598cbfa Feel::NullSpace<>::orthonormalizeBasisVector()
@ 0x7fdb51001944 _ZN4Feel9NullSpaceIdE12updateForUseINS_13FunctionSpaceINS_4MeshINS_7SimplexILt3ELt1ELt3EEEdLi0EEENS_5basesIJNS_8LagrangeILt1ENS_9VectorialENS_10ContinuousENS_14PointSetFeketeELt0EEEEEEN5boost9parameter5void_ESH_SH_E7ElementIdNS_11VectorUblasIdNSF_7numeric5ublas6vectorIdNSM_15unbounded_arrayIdSaIdEEEEEEEEEEEvRKSt16initializer_listIT_EN4mpl_5bool_ILb1EEE
@ 0x7fdb50ffb1d7 _ZN4Feel9NullSpaceIdEC2INS_13FunctionSpaceINS_4MeshINS_7SimplexILt3ELt1ELt3EEEdLi0EEENS_5basesIJNS_8LagrangeILt1ENS_9VectorialENS_10ContinuousENS_14PointSetFeketeELt0EEEEEEN5boost9parameter5void_ESH_SH_E7ElementIdNS_11VectorUblasIdNSF_7numeric5ublas6vectorIdNSM_15unbounded_arrayIdSaIdEEEEEEEEEEERKSt16initializer_listIT_E
@ 0x7fdb50b31edf _ZN4Feel10FeelModels6detail12getNullSpaceIN5boost10shared_ptrINS_13FunctionSpaceINS_4MeshINS_7SimplexILt3ELt1ELt3EEEdLi0EEENS_5basesIJNS_8LagrangeILt1ENS_9VectorialENS_10ContinuousENS_14PointSetFeketeELt0EEEEEENS3_9parameter5void_ESI_SI_EEEEEENS_9NullSpaceIdEERKT_N4mpl_4int_ILi3EEE
@ 0x7fdb50b2d113 Feel::FeelModels::SolidMechanics<>::init()
@ 0x458522 Feel::runApplicationSolid<>()
@ 0x43dc8f main
@ 0x7fdb22396830 __libc_start_main
@ 0x43d0b9 _start
@ (nil) (unknown)
Aborted (core dumped)
The porosity appears to be considered scalar in the mixed-Poisson sources. It could be interesting to generalize to tensors in order to manage anisotropic situations.
add FSI examples initially describe in
A solution for the incompressibility dilemma in partitioned fluid–structure interaction with pure Dirichlet fluid domains ( Ulrich KüttlerChristiane FörsterWolfgang A. Wall)
with the square and the bended domain.
Others description/results can be found in :
add doc + example of python code to access girder
Describe the bug
the images are missing in
@Trophime would it be possible to fix this ?
This example shows the distribution of the electric potential
The prefix "n" indicates that the electric current is due to negatively charged electrons.
This simulation involves a non-homogeneous problem with internal interfaces and it has been solved with the HDG method applied to the Darcy problem.
A scheme of a realistic floating-gate nMOS transistor used as a nonvolatile memory device is shown with the schematic representation of the two-dimensional cross-section in which the control gate is now included for sake of simplicity in Figure ??
The device is composed of a pair of n-doped source and drain regions, a p-doped substrate region and a silicon dioxide (SiO2) region in which a control gate and a floating gate are buried.
The floating gate is isolated from the control gate by an inter-polysilicon dielectric (IPD) layer beneath the control gate.
Physical parameters:
Device parameters:
The main goal of the simulations is to determine, via the integral boundary condition, the value attained on
This value is the threshold voltage of the device, denoted henceforth by
The accurate prediction of the threshold voltage may be significantly influenced by the numerical treatment of the heterogeneous material device structure across the interface
With this respect the HDG framework appears to be the ideal computational approach because it allows to enforce, at the same time and in a strong manner, (a) the jump of the normal component of the electric displacement vector across the interface and (b) the continuity of the electric potential, at suitable quadrature nodes on each face belonging to
poisson: give toolbox name
already in the geometry and in the input parameters
Boundary conditions:
Interface conditions:
The quantities \bar{V|_{bi,j} are the built-in potentials associated with the subdomain regions
describe the output set of the example
add scalar vectorial and matricial fields to be visualized
add measures, scalar quantities, mean values, performance metrics
Is your feature request related to a problem ? Please describe.
Currently the way we get to output from Feel++ apps is cumbersome and not very user friendly
We should be able to retrieve the data from the simulation in an easier way
Describe the solution you'd like
Several solutions were discussed:
Additional context
The duscussion was with a participant of the ECMI 2018 conference
compare the performances of different linear solvers in linear elasticity
pc-type
ksp-type
compressible
describe set of boundary conditions
performance metrics:
add scalar vectorial and matricial fields to be visualized
add measures, scalar quantities, mean values, performance metrics
Describe Benchmark type:
The performance will be compared with SOFA framework
Is your feature request related to a problem ? Please describe.
There is some boilerplate when adding a new case documentation and input files.
This could be simplified/accelerated via a template system
Describe the solution you'd like
Ruby provides some nice tools and in particular supports Liquid templating.
the testcase is described in the Feel++ courses
@olmes-sch you will work with @celineCQ
2D building aerothermal flow
In the research area of building physics, the so-called HAMSTAD (Heat, Air and Moisture STAnDardization) project is a very well known benchmark for the testing of simulation tools
see e.g.
use toolbox application report and add it to the antora site along the description of the testcase
the report is at the toplevel of the application repository
see course example
Is your feature request related to a problem ? Please describe.
We don't have CI support for toolbox. We should be able to know the status of all the cases stored
Describe the solution you'd like
we should have a quick way to assess the health of the case files and also be able to run all cases
I suggest using --check-init
to run simulation up to init()
stage included
we then use buildkite to run all the registered cases
Is your feature request related to a problem ? Please describe.
A ECMI 2018 participant would like to enable reduced order methods from Feel++ in MSO4SC
Describe the solution you'd like
The offline stage can definitely be deployed and the output databases can be then uploaded to Girder.
Additional context
Request from a ECMI 2018 participant
add the 2D Chorus AIRBUS testcase
The documentation is here
Add the magnet thermo-electric example in https://github.com/feelpp/feelpp/tree/develop/toolboxes/thermoelectric/ElectroMagnets in feelpp/toolboxes
.
It could start as an example or could be in benchmarks if we compare the results with what is obtained with current hifimagnet models and the thermo-electric toolbox
Is your feature request related to a problem ? Please describe.
is it possible to compute outputs such as
Describe the solution you'd like
if yes, how is it done in the PostProcessing section?
Additional context
This was asked by one participant of ECMI 2018 conference.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.