Hi, i was wondering how to make a mesh for my turtleFSI
I edited TF_cfd and removed the flag properties but need to edit the mesh to do the same but don't now how to adjust it .
File under GNU GPL (v3) licence, see LICENSE file for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
"""Problem file for running the "CFD" benchmarks in [1]. The problem is a channel flow
with a circle and a flag attached to it. For the CFD problem both the circle and flag is rigid.
[1] Turek, Stefan, and Jaroslav Hron. "Proposal for numerical benchmarking of fluid-structure interaction
between an elastic object and laminar incompressible flow." Fluid-structure interaction.
Springer, Berlin, Heidelberg, 2006. 371-385."""
from dolfin import *
import numpy as np
from os import path
from turtleFSI.problems import
from turtleFSI.modules import
Overwrite or add new variables to 'default_variables'
default_variables.update(dict(
# Temporal variables
T=30, # End time [s]
dt=0.01, # Time step [s]
theta=0.5, # Temporal scheme
# Physical constants
rho_f=1.0E3, # Fluid density [kg/m3]
mu_f=1.0, # Fluid dynamic viscosity [Pa.s]
Um=2.0, # Max. velocity inlet (CDF3: 2.0) [m/s]
# Problem specific
folder="TF_cfd_results", # Name of the results folder
solid="no_solid", # Do not solve for the solid
extrapolation="no_extrapolation", # No displacement to extrapolate
# Geometric variables
H=0.41, # Total height
L=2.5)) # Length of domain
return default_variables
Hi, i was wondering how to make a mesh for my turtleFSI I edited TF_cfd and removed the flag properties but need to edit the mesh to do the same but don't now how to adjust it .
File under GNU GPL (v3) licence, see LICENSE file for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
"""Problem file for running the "CFD" benchmarks in [1]. The problem is a channel flow with a circle and a flag attached to it. For the CFD problem both the circle and flag is rigid.
[1] Turek, Stefan, and Jaroslav Hron. "Proposal for numerical benchmarking of fluid-structure interaction between an elastic object and laminar incompressible flow." Fluid-structure interaction. Springer, Berlin, Heidelberg, 2006. 371-385."""
from dolfin import * import numpy as np from os import path
from turtleFSI.problems import from turtleFSI.modules import
def set_problem_parameters(default_variables, **namespace):
Overwrite or add new variables to 'default_variables'
def get_mesh_domain_and_boundaries(L, H, **namespace):
Load and refine mesh
def initiate(**namespace):
Lists to hold displacement, forces, and time
class Inlet(UserExpression): def init(self, Um, H, *kwargs): self.Um = Um 1.5 self.H = H self.factor = 0 super().init(**kwargs)
def create_bcs(DVP, Um, H, v_deg, boundaries, **namespace):
Create inlet expression
def pre_solve(t, inlet, **namespace): """Update boundary conditions""" inlet.update(t)
def postsolve(t, dvp, n, drag_list, lift_list, time_list, mu_f, verbose, ds, **namespace):
Get deformation, velocity, and pressure
def finished(drag_list, lift_list, time_list, results_folder, **namespace):
Store results when the computation is finished