Comments (7)
Both groups point to the same flame object ... Python treats everything as a reference
from ctwrap.
This may require a second flame
object. Note that simulations can be restarted, see:
https://github.com/Cantera/cantera/blob/d8e62addc8bc535588cbf8d1bd832010b22acf1f/interfaces/cython/cantera/onedim.py#L96
from ctwrap.
Process Process-1:
Traceback (most recent call last):
File "/home/david/anaconda3/envs/ctwrap/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/home/david/anaconda3/envs/ctwrap/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/home/david/ctwrap/ctwrap/simulation.py", line 752, in worker
obj.run(group, config, **kwargs)
File "/home/david/ctwrap/ctwrap/simulation.py", line 143, in run
self.data = self._module.run(name, **config, **kwargs)
File "/home/david/ctwrap/ctwrap/modules/adiabatic_flame.py", line 104, in run
g.solve(loglevel) # don't use 'auto' on subsequent solves
File "/home/david/anaconda3/envs/ctwrap/lib/python3.7/site-packages/cantera/onedim.py", line 864, in solve
return super().solve(loglevel, refine_grid, auto)
File "interfaces/cython/cantera/onedim.pyx", line 1139, in cantera._cantera.Sim1D.solve
cantera._cantera.CanteraError:
***********************************************************************
CanteraError thrown by OneDim::timeStep:
Time integration failed.
***********************************************************************
from ctwrap.
This is what I am trying to do.
# set up flame object
width = domain.width.m_as('meter')
f = ct.FreeFlame(gas, width=width)
f.set_refine_criteria(ratio=3, slope=0.06, curve=0.12)
if loglevel > 0:
f.show_solution()
out = {}
# Solve with mixture-averaged transport model
f.transport_model = 'Mix'
f.solve(loglevel=loglevel, auto=True)
# Solve with the energy equation enabled
if loglevel > 0:
f.show_solution()
msg = ' {0:s}: mixture-averaged flamespeed = {1:7f} m/s'
print(msg.format(name, f.velocity[0]))
group = name + "_mix"
out[group] = f
f_sol = f.to_solution_array()
# Solve with multi-component transport properties
g = ct.FreeFlame(gas, width=width)
g.set_initial_guess(data=f_sol)
g.set_refine_criteria(ratio=3, slope=0.06, curve=0.12)
g.transport_model = 'Multi'
g.solve(loglevel) # don't use 'auto' on subsequent solves
if loglevel > 0:
g.show_solution()
msg = ' {0:s}: multi-component flamespeed = {1:7f} m/s'
print(msg.format(name, g.velocity[0]))
from ctwrap.
Ok. The restart doesn’t appear to work. Can you troubleshoot this in a jupyter notebook (I.e. without ctwrap)
from ctwrap.
Okay
from ctwrap.
When you set g
, the gas won’t have the correct composition any longer
from ctwrap.
Related Issues (20)
- Minor issues for 0.2.0 HOT 3
- Improve unittests / fix unittest failures HOT 1
- Parallel simulation failures on Linux HOT 1
- Make Parser more intuitive
- Make save method optional
- Streamline Parser usage
- Add tests for custom simulation modules
- Simplify syntax of variation
- Implement capability to restart simulations
- Ensure that custom.save works
- Parallel batch jobs fail silently HOT 1
- Support saving of non-HDF output HOT 1
- Add additional simulation modules for standard simulations
- Make interface more flexible
- Improve warning/error messages
- Freeflame does not generate CSV output
- Create easy way to debug HOT 1
- Add test based on cantera ubuntu package
- Example can not be run correctly HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctwrap.