-
Notifications
You must be signed in to change notification settings - Fork 247
Applying periodic boundary conditions
In KratosMultiphysics, application of periodic boundary conditions can be done using the apply_periodic_condition_process
. This process uses linear master-slave constraints to apply a periodic condition between the specified boundary (sub)modelparts.
An example entry for such a process in the the processes list in the ProjectParameters.json
is given below.
{
"python_module": "apply_periodic_condition_process",
"kratos_module": "KratosMultiphysics",
"process_name": "ApplyPeriodicBoundaryConditionProcess",
"Parameters": {
"computing_model_part_name": "computing_domain",
"model_part_name": "Structure",
"first_model_part_name": "GENERIC_horiSurface",
"second_model_part_name": "GENERIC_vertSurface",
"interval": [0.0, 1e30],
"variable_names": ["DISPLACEMENT"],
"transformation_settings": {
"rotation_settings": {
"center": [0.0, 0.0, 0.0],
"axis_of_rotation": [0.0, 0.0, 1.0],
"angle_degree": 90.0
}
},
"search_settings": {
"max_results": 100,
"tolerance": 1E-2
}
}
}
From the above json parameters : python_module
, kratos_module
, process_name
are always the same.
Parameters
dictionary changes depending on the case. Explanation of the entries of Parameters
dictionary is as follows :
computing_model_part_name
: Name of the computing modelpart from the solver.
model_part_name
: This is the name of the modelpart which is specified in the solver_settings
dictionary
Periodic boundary conditions is always applied to a pair of modelparts.
first_model_part_name
: Name of the first (sub)modelpart in the pair. (internally the master modelpart for the master-slave relation)
second_model_part_name
: Name of the second (sub)modelpart in the pair. (internally the slave modelpart for the master-slave relation)
interval
: The time interval during which the periodic boundary condition is active.
variable_names
: The list of variable for which are to be periodic on first and second (sub)modelparts. IMPORTANT: These variables should be Degree of Freedom (DOFs) for the given problem for the periodic condition to be effective.
transformation_settings
: This defines how the modelparts with names first_model_part_name
and second_model_part_name
are geometrically related to each other. This can be of two types : rotational or translational. Rotational relation requires axis_of_rotation
, center
and angle
where as the translational relation requires : dir_of_translation
and magnitude
to be specified.
The relationship between the nodes on the two specified (sub)modelparts is found using nearest element relation ship. That is nodes on the second (here slave) (sub)modelpart are projected on to the first (sbu)modelpart and are located inside a triangle/rectangle/line to find its corresponding master nodes and the master-slave relation is formed accordingly. For this search search_settings
is used.
search_settings
: recommended only for advanced users, this contains the setting for the nearest neighbor search for formulating the master-slave relation.
Two example cases are provided in the Examples repository under KratosMultiphyiscs.
- A structural example can be found here. The example is of a disk with unit thickness fixed on its axis and is subjected to uniform and steady centrifugal force. Here instead of the whole disk only a quarter portion of the disk is modeled by specifying periodic boundary conditions.
Problem Setup
Reconstructed Solution of Half Disk
- A fluid example can be found here. The example is a simulation of Kelvin-Helmholtz instability. This requires a infinitely long domain whose upper and lower halves move at different (usually opposite) velocities. In this example only a portion of the domain (unit square) is simulated with periodic boundary condition applied on the two sides.
Instability Simulation Result(Vorticity magnitude)
Here the instabilities can be seen forming at the middle of the domain and the fluid mixing.
- Getting Kratos (Last compiled Release)
- Compiling Kratos
- Running an example from GiD
- Kratos input files and I/O
- Data management
- Solving strategies
- Manipulating solution values
- Multiphysics
- Video tutorials
- Style Guide
- Authorship of Kratos files
- Configure .gitignore
- How to configure clang-format
- How to use smart pointer in Kratos
- How to define adjoint elements and response functions
- Visibility and Exposure
- Namespaces and Static Classes
Kratos structure
Conventions
Solvers
Debugging, profiling and testing
- Compiling Kratos in debug mode
- Debugging Kratos using GDB
- Cross-debugging Kratos under Windows
- Debugging Kratos C++ under Windows
- Checking memory usage with Valgind
- Profiling Kratos with MAQAO
- Creating unitary tests
- Using ThreadSanitizer to detect OMP data race bugs
- Debugging Memory with ASAN
HOW TOs
- How to create applications
- Python Tutorials
- Kratos For Dummies (I)
- List of classes and variables accessible via python
- How to use Logger
- How to Create a New Application using cmake
- How to write a JSON configuration file
- How to Access DataBase
- How to use quaternions in Kratos
- How to do Mapping between nonmatching meshes
- How to use Clang-Tidy to automatically correct code
- How to use the Constitutive Law class
- How to use Serialization
- How to use GlobalPointerCommunicator
- How to use PointerMapCommunicator
- How to use the Geometry
- How to use processes for BCs
- How to use Parallel Utilities in futureproofing the code
- Porting to Pybind11 (LEGACY CODE)
- Porting to AMatrix
- How to use Cotire
- Applications: Python-modules
- How to run multiple cases using PyCOMPSs
- How to apply a function to a list of variables
- How to use Kratos Native sparse linear algebra
Utilities
Kratos API
Kratos Structural Mechanics API