Solver diverging after some iteration #2318
|
Hi again, I am using this case file {
"version": 1.0,
"case": {
"mesh_file": "new_mesh.nmsh",
"output_at_end": true,
"output_boundary": true,
"output_checkpoints": false,
"nsamples": 10,
"numerics": {
"polynomial_order": 5,
"time_order": 3,
"dealias": true
},
"fluid": {
"scheme": "pnpn",
"Re": 5600.0,
"boundary_conditions": [
{
"type": "no_slip",
"zone_indices": [1]
},
{
"type": "velocity_value",
"value": [3.0, 0.0, 0.0],
"zone_indices": [2]
},
{
"type": "outflow+dong",
"zone_indices": [3]
}
],
"initial_condition": {
"type": "uniform",
"value": [3.0, 0.0, 0.0]
},
"velocity_solver": {
"type": "cg",
"preconditioner": {
"type": "jacobi"
},
"projection_space_size": 0,
"absolute_tolerance": 1e-7,
"max_iterations": 800
},
"pressure_solver": {
"type": "gmres",
"preconditioner": {
"type": "hsmg"
},
"projection_space_size": 5,
"absolute_tolerance": 1e-3,
"max_iterations": 800
},
"output_control": "simulationtime",
"output_value": 0.5
},
"time": {
"end_time": 45.0,
"variable_timestep": true,
"target_cfl": 0.4,
"max_timestep": 1e-4
},
"simulation_components": [
{
"type": "lambda2"
},
{
"type": "curl",
"fields": ["u", "v", "w"]
}
]
}
}but unfortunately the solution diverged after some, can someone help me with the case file what is incorrect? I am sharing the log and error log below. Thanks |
Replies: 1 comment 3 replies
|
This could be due to many different things, but the first thing I'd do in this situation do is to have a look at the flow field: do you see any abnormal values? If so, where are they located (on the boundaries?)? Check the walls, is the no-slip imposed properly? Does the flow flow in the right direction? In other words: does the flow look like what you expect? You may attach some snapshots here for us to look at if you are unsure. On another note, for this case I would recommend you set the projection space for the pressure solver to 0. Notice that projections are not being used at the beginning of your simulation to "get the residuals down", and the variable time-stepping is resetting your projection space every time It saves you at most 1 or 2 pressure iterations. In my experience projections are only helpful to get residuals down at the beginning of a simulation if it is a difficult case to get to "converge". In your case you don't need them. I also see from your case file that you only have three boundary zones: 1,2 and 3. I would expect more boundaries for a channel case: two walls, inflow and outflow. I suspect that the two zones corresponding to the walls got merged into labeled zone I don't think that is the source of your problem, but if you'd want to try to separate the zones into two separate boundaries, you can set a "dummy" label ( e.g. For example: from mshconvert import *
convert('new_mesh.msh',
bcs={
10:'W',
13:'W', # <-- replace one of the 'w'/'W' with 's', a dummy label that rea2nbin will still recognize
12:'v',
15:'o'})That way, the Hopefully this can help you move in the right direction, but unfortunately there is no recipe for how to solve these things. |
Yes, please have a look at the probes documentation page.
You can generate a set of points yourself based on your domain and sample the fields u,v,w at a given frequency.