Developer Documentation
API
GeMotion.plot_all_unitsquare4 — Methodplot_all_unitsquare4(psih, Pih, Th, uh, model, name, levels)TBW
GeMotion.simulate8 — Methodsimulate(;name="sim",Pr=1.0,Ra=1.0,n=1.0,model=CartesianDiscreteModel((0, 1, 0, 1), (20, 20)),nlsolver_opts=(;show_trace=true,method=:newton,linesearch=BackTracking(),ftol=1E-8,xtol=1E-10),T_diri_tags=["leftline","rightline","botleftpoint","botrightpoint","topleftpoint","toprightpoint"],T_diri_expressions=[0.0,1.0,0.0,1.0,0.0,1.0])Simulate the flow in a square cavity with a moving lid and a temperature gradient.
Arguments
name::String: Name of the simulation.Pr::Float64: Prandtl number.Ra::Float64: Rayleigh number.n::Float64: Power of the viscosity.model::DiscreteModel: Number of elements in each direction.nlsolver_opts::Dict: Options for the nonlinear solver.T_diri_tags::Array{String}: Tags for the Dirichlet boundary conditions for the temperature.T_diri_expressions::Array{Float64}: Expressions for the Dirichlet boundary conditions for the temperature.T_natural_tags::Array{String}: Tags for the Natural boundary conditions for the temperature, used to apply zero Dirichlet BCs for the heat function Pi.
Returns
uh::FEFunction: Velocity field.ph::FEFunction: Pressure field.Th::FEFunction: Temperature field.psih::FEFunction: Stream function.Nu::Interpolable: Nusselt number.Sth::FEFunction: Local heat entropy.Sfl::FEFunction: Local fluid entropy.btrian::BoundaryTriangulation: Boundary triangulation.model::CartesianDiscreteModel: Model.Ωₕ::Triangulation: Triangulation.Pr::Float64: Prandtl number.Ra::Float64: Rayleigh number.
Example
simulate(;name="sim",Pr=1.0,Ra=1.0,n=1.0,model=CartesianDiscreteModel((0, 1, 0, 1), (20, 20)),nlsolver_opts=(;show_trace=true,method=:newton,linesearch=BackTracking(),ftol=1E-8,xtol=1E-10),T_diri_tags=["leftline","rightline","botleftpoint","botrightpoint","topleftpoint","toprightpoint"],T_diri_expressions=[0.0,1.0,0.0,1.0,0.0,1.0])