A novel finite element solver for Newtonian, Non-Newtonian, and Viscoelastic flows. Born in Julia, Reforged in C++.
Request Academic AccessRheoFEM is a cutting-edge codebase designed specifically for complex rheological problems. While traditional solvers struggle with high Weissenberg numbers in viscoelastic flows, RheoFEM utilizes a novel numerical approach to ensure stability and convergence.
Development Roadmap: Initially prototyped in Julia for algorithm validation, the core kernel is now refactored into modern C++ (C++20 standards) for high-performance computing components.
# Solving a simple Poiseuille flow in Julia using CairoMakie for visualization
using RheoFEM
using CairoMakie
function solve_channel_flow()
# Define Domain and Physics
mesh = RectilinearGrid((0.0, 10.0), (0.0, 1.0), 0.1)
fluid = OldroydB(viscosity=1.0, relaxation_time=0.5)
# Solve System using Newton-Raphson
solver = FEMSolver(mesh, fluid)
u, p, τ = solve!(solver, method=:NewtonRaphson)
# Visualization
fig = Figure(resolution = (800, 400))
ax = Axis(fig[1, 1], title = "Velocity Field")
heatmap!(ax, u)
return fig
end
/* * Core solver implementation in C++20.
* Handles element assembly for viscoelastic contribution.
*/
#include <RheoFEM/Solver.hpp>
#include <RheoFEM/Materials.hpp>
namespace RheoFEM {
void RunSimulation() {
// Initialize parallel environment
Parallel::Initialize();
auto mesh = Mesh::Load("channel_2d.msh");
auto fluid = std::make_shared<Materials::OldroydB>(1.0, 0.5);
// Configure Non-Linear Solver with specific tolerance
Solver::NonLinear solver(mesh, fluid);
solver.SetTolerance(1e-6);
try {
auto result = solver.Solve();
IO::ExportVTK(result, "output.vtu");
} catch (const std::exception& e) {
Logger::Error(e.what());
}
}
} // namespace RheoFEM
Simulation of elastic turbulence in micro-channels.
Droplet deformation dynamics using novel interface tracking.
Velocity profile validation against analytical solutions.
RheoFEM is currently available for collaborative academic research only.