加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT
-----------------------------------------------------------------
>> Elastohydrodynamic Lubrication Point Contact Solver for MATLAB
-----------------------------------------------------------------

Based on the theory presented in Venner and Lubrecht's book "Multilevel Methods in Lubrication", with the following modifications:
- Fourier Transforms are used to calculate deformation instead of the Multi-Level Multi-Integration mentioned in the book
- Parallel line solvers are provided.
- An option to execute the solver using the GPU is added

There are multiple execution strategies that can be used:
- cpu_seq : The CPU will solve and progress in the domain line by line, using a banded matrix solver with 6 bands. This is faithful to the algorithm mentioned in the book.
- cpu_par : The CPU solves in parallel, solving multiple lines at the same time, provided that the data required does not overlap (similar to a red-black algorithm, except for lines). There is some overhead to launching a parallel pool. Requires Parallel Computing Toolbox.
- gpu_seq : The GPU will solve and progress in the domain line by line, using a banded matrix solver with 5 bands. Only for debugging purposes because this is slow.
- gpu_par : The GPU solves in parallel, solving multiple lines at the same time, provided that the data required does not overlap (similar to a red-black algorithm, except for lines). Performance relative to the CPU will scale with the number of lines that can be solved in parallel. 

Examples are provided in the +examples folder. To run them, you must be in the project root folder (i.e. where this README is). From there, you can run examples from the examples namespace. E.g. from the command window in the root folder:

CPU Examples:
>> examples.ex1 : Basic Example with Result Plots
>> examples.ex2 : Basic Example with Textual Verbosity
>> examples.ex3 : Non-Isoviscous Fluids with Graphical Verbosity
>> examples.ex4 : Non-Isoviscous Fluids with Single Precision
>> examples.ex5 : Uses the parallel line solver, but single grid only
>> examples.ex6 : Uses the parallel line solver, but with multiple grids

GPU Examples (require MATLAB with Parallel Computing Toolbox and a supported NVIDIA GPU):
>> examples.ex7 : Sequential GPU solver
>> examples.ex8 : Parallel GPU line solver, but with single grid
>> examples.ex9 : Parallel GPU line solver, but with multiple grids

Benchmarks are provided to show the difference in performance between the execution modes. They are located in the +bench folder:
>> bench.singleGrid : Single Grid benchmarks for 5 iterations.
>> bench.multiGrid : Multi-Grid benchmarks for 1 iteration.

Note on GPU support: GPU support requires mex building. Pre-built mex binary files are available from the releases section. Place them inside the +utils folder after download. If you wish to build them yourself:
- Windows: Use the .\make-mex.bat script provided in the +utils folder. The mex file currently uses C++17, which needs a newer version of MATLAB than R2021b. So mexcuda can not be used and a local install of CUDA >= 11.2 must be provided. To build, a $MATLABROOT environment variable must be available (or else specify explicitly in the bat file) and the MSVC build environment must be initialised via the MSVS developer command prompt. If the environment is set correctly, the mex file will build automatically as part of the solution process, otherwise call the script directly from inside the +utils folder.
- Linux: Use the ./make-mex.sh script provided in the +utils folder. The mex file currently uses C++17, which needs a newer version of MATLAB than R2021b. So mexcuda can not be used and a local install of CUDA >= 11.2 must be provided. If the variables required by the script are set correctly, the mex file will build automatically as part of the solution process. (If using WSL, make sure the script has LF endings instead of CRLF)

Variable naming conventions are kept similar to those used in "Multilevel Methods in Lubrication".

References:
Venner, C.H., Lubrecht, A.A. (Eds.), 2000. Chapter 6 - ElastoHydrodynamic Lubrication, in: Multilevel Methods in Lubrication, Tribology Series. Elsevier, pp. 179–223. https://doi.org/10.1016/S0167-8922(00)80010-3
MIT License Copyright (c) 2021 theComputeKid -> GitHub: https://github.com/theComputeKid -> GitLab: https://gitlab.com/theComputeKid -> Email: theComputeKid@gmail.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

forked from https://github.com/theComputeKid/ehl-point-stationary 展开 收起
Matlab 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化