Hi Matthias,
Thanks for responding and “accepting the challenge”; at least you show some attention and good will (unlike the developers...). Unfortunately, this good will is not sufficient to meet the challenge, and your triumphant announcement:
“Conclusion: Zoltan's sif file can be generated by ElmerGUI as shown in my previous post. “
is not true. You are cheating!
This sif file that you claim you have generated purely in GUI:
Code: Select all
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
$ Density_M = 1.205
$ Angular_Frequency_M = 2155
End
Simulation
Max Output Level = 5
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Solver Input File = case.sif
Post File = case.vtu
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
Body 1
Target Bodies(1) = 9
Name = "Body 1"
Material = 1
Initial condition = 1
End
Solver 4
Equation = Flux and Gradient
Target Variable = String "Pressure Wave 2"
Flux Coefficient = String "Cv"
Procedure = "FluxSolver" "FluxSolver"
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = Diagonal
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
End
Solver 1
Equation = Result Output
Output Format = Vtu
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Output File Name = case
Exec Solver = Always
End
Solver 2
Equation = Helmholtz Equation
Procedure = "HelmholtzSolve" "HelmholtzSolver"
Variable = -dofs 2 Pressure Wave
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = Diagonal
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
End
Solver 3
Equation = Flux and Gradient 2
Procedure = "FluxSolver" "FluxSolver"
Flux Coefficient = String "Cv"
Calculate Flux = True
Target Variable = String "Pressure Wave 1"
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Direct
Linear System Direct Method = Banded
End
Equation 1
Name = "Equation 1"
Angular Frequency = $ Angular_Frequency_M
Active Solvers(4) = 4 1 2 3
End
Material 1
Name = "Air (room temperature)"
Viscosity = 1.983e-5
Heat expansion Coefficient = 3.43e-3
Cv = Real $ 1/(Density_M * Angular_Frequency_M)
Heat Conductivity = 0.0257
Relative Permittivity = 1.00059
Sound speed = 343.0
Heat Capacity = 1005.0
Density = $ Density_M
End
Initial Condition 1
Name = "InitialCondition 1"
Pressure Wave 1 = 0
Pressure Wave 2 = 0
End
Boundary Condition 1
Target Boundaries(1) = 7
Name = "In"
Pressure Wave 2 = 0
Pressure Wave 1 = 100
End
Boundary Condition 2
Target Boundaries(1) = 8
Name = "Out"
Wave Flux 1 = 0
Wave Flux 2 = 0
Wave impedance 1 = 1
Wave impedance 2 = 2
End
does not work. The solver breaks down with error messages.
In order meet the challenge, you have to produce exactly the same sif file from GUI that I have originally posted. If you do that, then there is no need to run it, because it has been proven earlier in another thread that it works, and produces accurate results. To ease the task, you can include the lines:
Code: Select all
$ Density_M = 1.205
$ Angular_Frequency_M = 2155
within the Header, that isn't the problem.
Alternatively, if whatever itch forces you to produce a different sif file, which is not the same as the original, then you have to test it whether at least it runs or not, and whether the results are equally correct as those produced by the original sif file, or not.
“Just click something together that resembled vaguely to your settings”
and expect people to accept it as a triumphant solution is not fair. In fact it doesn't even resemble the original sif file by my measure.
Also, merely posting a sif file without explaining how you made it in GUI is of no use, it doesn't help anybody. The very purpose of this discussion is to find out “HOW to do it”. This part is also missing from your response.
Let me rephrase the original “challenge” to be more specific:
Please, generate the original sif file first posted in this thread exclusively from GUI, without any GUI code modifications, AND describe in detail exactly how you did that, so that anybody should be able to replicate your result, step by step in the style of:
Code: Select all
Add a FluxSolver tab to GUI like this:
File>Definitions...>Append>/usr/share/ElmerGUI/edf-extra/fluxsolver.xml>[Open] etc.
I am not expecting anything from you that I wouldn't do myself, if I could. In fact if you don't discover the problems yourself, then I will post the process of my attempt later on, to show where it fails, and what needs to be fixed. This is also ElmerGUI version dependent, and the main problems encountered in an earlier version seem to be resolved in the more recent version; but now new bugs are preventing success.
Let's consider some common sense issues as well:
1) The purpose of the GUI is to make the work with the solver more user friendly, freeing them from the burden of learning the structure, syntax, mandatory lines etc. of the sif input file. It is easier to choose from a list of possible options, than finding, and adding everything needed in a syntax sensitive manner to a sif file. Many people who refuse to deal with input files, would be still very happy to work with a GUI.
2) It is unreasonable if you or the GUI developers expect the GUI user to learn (or already know) xml, and program his own GUI modifications, in order to enable a solver handling like FluxSolver. If the user can do such a thing, then he will surely be able to learn the much simpler task of writing the sif directly, and then he will not need the GUI any more, nor its modification via xml. If the user needs the GUI, because the sif file writing is too much bother for him, then the xml writing will be surely out of question.
3) The idea of the GUI modifications via xml is great, but the xml code should be written by the developers (or volunteer users who claim to be able to do it) and also verify that they work as they should. With other words, expecting from average users to do this is completely unrealistic.
4) If there already exist such xml files like those in /usr/share/ElmerGUI/edf-extra/ folder for already existing solvers, then I don't see any acceptable reason why they should not be a permanent part of the GUI. If those are added by default, then the problem of users struggling with this issue never emerges.
5) The very useful function of File>Definitions… and the manual writing of xml files would then be restricted to users who write their own solvers, which are not available yet in the ElmerSolver package. But if someone can write a solver, then it is a reasonable expectation that he will be also able and willing to write the xml file as well. So there is no conflict here. But the expectation that all GUI users should belong to this group of people (or else must be happy with the default functionality of the GUI; or even worse: pay for extra services) is unreasonable.
Therefore, if I would really want to represent the best interests of the average GUI users, then the “challenge” supposed to also include the restriction: “...without any manual xml file modifications...”; but I guess that would be too much for you to meet now. So I will be satisfied, if you do it even by manually modifying the xml files, as long as you also show what, and how you modified.
Zoltan
mzenker wrote:Hi Zoltan,
OK, challenge taken...
This is what I produced quickly with ElmerGUI:
Code: Select all
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
$ Density_M = 1.205
$ Angular_Frequency_M = 2155
End
Simulation
Max Output Level = 5
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Solver Input File = case.sif
Post File = case.vtu
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
Body 1
Target Bodies(1) = 9
Name = "Body 1"
Material = 1
Initial condition = 1
End
Solver 4
Equation = Flux and Gradient
Target Variable = String "Pressure Wave 2"
Flux Coefficient = String "Cv"
Procedure = "FluxSolver" "FluxSolver"
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = Diagonal
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
End
Solver 1
Equation = Result Output
Output Format = Vtu
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Output File Name = case
Exec Solver = Always
End
Solver 2
Equation = Helmholtz Equation
Procedure = "HelmholtzSolve" "HelmholtzSolver"
Variable = -dofs 2 Pressure Wave
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = Diagonal
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
End
Solver 3
Equation = Flux and Gradient 2
Procedure = "FluxSolver" "FluxSolver"
Flux Coefficient = String "Cv"
Calculate Flux = True
Target Variable = String "Pressure Wave 1"
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Direct
Linear System Direct Method = Banded
End
Equation 1
Name = "Equation 1"
Angular Frequency = $ Angular_Frequency_M
Active Solvers(4) = 4 1 2 3
End
Material 1
Name = "Air (room temperature)"
Viscosity = 1.983e-5
Heat expansion Coefficient = 3.43e-3
Cv = Real $ 1/(Density_M * Angular_Frequency_M)
Heat Conductivity = 0.0257
Relative Permittivity = 1.00059
Sound speed = 343.0
Heat Capacity = 1005.0
Density = $ Density_M
End
Initial Condition 1
Name = "InitialCondition 1"
Pressure Wave 1 = 0
Pressure Wave 2 = 0
End
Boundary Condition 1
Target Boundaries(1) = 7
Name = "In"
Pressure Wave 2 = 0
Pressure Wave 1 = 100
End
Boundary Condition 2
Target Boundaries(1) = 8
Name = "Out"
Wave Flux 1 = 0
Wave Flux 2 = 0
Wave impedance 1 = 1
Wave impedance 2 = 2
End
Note that I did really just click something together that resembled vaguely to your settings. I did not run it. What I did to get the 2nd instance of FluxSolver is just copy the fluxsolver.xml and change its file name and tab name (line 5 of fluxsolver.xml) by appending a "2".
So I am pretty sure now that the sif file you posted above can be closely reproduced with ElmerGUI.
The only exception is perhaps for the MATC definitions, which I inserted in the free text field in the Header section. I hope they will be globally valid anyway.
Up to you to try it out...
HTH,
Matthias
EDIT: I have just reread some of the previous posts - the MATC definitions outside sections might in fact be necessary and cannot be done with ElmerGUI AFAIK. I don't have the time to investigate further right now, maybe later...
EDIT 2: I have checked that MATC variables defined inside sections (at least in the Header section) are seen globally, see next post.
mzenker wrote:Hi,
a quick check shows that the MATC expressions do not need to be placed outside a section. In the following simple sif (generated by ElmerGUI), a MATC variable Testx is defined in the Header section (free text field) and used in the Boundary Condition 1:
Code: Select all
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
$ Testx = 100
End
Simulation
Max Output Level = 5
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 20
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Solver Input File = case.sif
Post File = case.vtu
Coordinate Scaling = 0.001
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
Body 1
Target Bodies(1) = 7
Name = "Body 1"
Equation = 1
Material = 1
Initial condition = 1
End
Solver 1
Equation = Heat Equation
Procedure = "HeatSolve" "HeatSolver"
Variable = Temperature
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = Diagonal
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
End
Equation 1
Name = "Equation 1"
Active Solvers(1) = 1
End
Material 1
Name = "Iron (generic)"
Heat expansion Coefficient = 11.8e-6
Heat Conductivity = 80.2
Sound speed = 5000.0
Heat Capacity = 449.0
Mesh Poisson ratio = 0.29
Density = 7870.0
Poisson ratio = 0.29
Youngs modulus = 193.053e9
End
Initial Condition 1
Name = "InitialCondition 1"
Temperature = 300
End
Boundary Condition 1
Target Boundaries(1) = 3
Name = "BoundaryCondition 1"
Temperature = $ Testx * 2
End
Boundary Condition 2
Target Boundaries(1) = 6
Name = "BoundaryCondition 2"
Temperature = 600
End
I have verified that it works as expected, and that if I change Testx and rerun, the temperature at the boundary changes as expected.
Conclusion: Zoltan's sif file can be generated by ElmerGUI as shown in my previous post.
HTH,
Matthias