|
[Sponsors] |
What is the class type of solver_container for IncNSSolver |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Qi Wang
Join Date: Oct 2024
Posts: 7
Rep Power: 2 ![]() |
If I use IncNavier_Stokes in the configuration file, what exactly is the type of solver_container?
It is initialized in the CBaseSolver to be CSolver****, but it should be updated to be one of the derived classes right? I have been looking for the container_initialize but haven't find any clue. Ultimately, I'm trying to find what SetInitialCondition the solver uses exactly. It has been three days and I just could not get this piece of information from the code. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 719
Rep Power: 21 ![]() |
You can for instance follow one of the variables needed for initialization of the incompressible solver in vscode.
Take for instance INC_VELOCITY_INIT You will see if you search for this variable, that there is a function GetIncVelocity_Init This function is used in only one other file: CIncEulerSolver.cpp. As you will see, the Navier-Stokes solver inherits a lot from the Euler Solver. In the file, you will find CIncEulerSolver::SetNondimensionalization If you do not use nondimensional numbers, the values used for nondimensionalization will simply be set to 1. Another important place to look is CDriver.cpp, where the initialization has for instance InitializeSolver() From this function, we call the initialization using the restart file. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 719
Rep Power: 21 ![]() |
btw, if you want to do some special initialization, you can use the python wrapper for this. There are some examples in the TestCases folder.
|
|
![]() |
![]() |
![]() |
![]() |
#4 | |
New Member
Qi Wang
Join Date: Oct 2024
Posts: 7
Rep Power: 2 ![]() |
Quote:
solver_container[ZONE_0][INST_0][MESH_0][FLOW_SOL]->SetInitialCondition(geometry_container[ZONE_0][INST_0], solver_container[ZONE_0][INST_0], config_container[ZONE_0], TimeIter); |
||
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Qi Wang
Join Date: Oct 2024
Posts: 7
Rep Power: 2 ![]() |
Thanks a lot for this heads-up. Yes I'm trying to do some special initialization for my adjoint calculation and reading the code from scratch is a big pain so far... I would really appreciate it if you could pinpoint one of the testcases so I can modify the initial condition for the adjoint calculation.
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Evert Bunschoten
Join Date: Nov 2024
Location: Netherlands
Posts: 11
Rep Power: 2 ![]() |
The line
solver_container[ZONE_0][INST_0][MESH_0][FLOW_SOL]->SetInitialCondition(geometry_container[ZONE_0][INST_0], solver_container[ZONE_0][INST_0], config_container[ZONE_0], TimeIter); always calls the SetInitialCondition method from the derived class if defined. In case the solver you are using does not have the method SetInitialCondition defined, it will use the method from CFVMFlowSolverBase. |
|
![]() |
![]() |
![]() |
Tags |
su2 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
convergence problem of steady 2D film cooling calculation using chtMultiRegionFoam | ruanyg968tf | OpenFOAM Running, Solving & CFD | 1 | April 10, 2024 03:23 |
rhoSimpleFoam vs rhoPimpleFoam, steady state vs transient solver | Oliver Meng | OpenFOAM Running, Solving & CFD | 28 | January 12, 2023 05:13 |
activeBaffleVelocity boundary condition ? | om3ro | OpenFOAM Programming & Development | 10 | November 17, 2020 00:26 |
rSF: p divergence in combustor (wt negative value) | zonda | OpenFOAM Pre-Processing | 4 | April 10, 2018 07:59 |
singularity? | mihaipruna | OpenFOAM Running, Solving & CFD | 5 | April 24, 2012 18:18 |