Hi Logan,
Logan Sorenson wrote:
No problem! Glad you had a chance to escape to nature. Hope you caught some good scenery up there. :)
Yep, it was really cool :) [1]
[1] http://en.wikipedia.org/wiki/Aigüestortes_i_Estany_de_Sant_Maurici_National_Park
There are a couple of ways how make this parametric study with varying the frequency. The first one is the one you have used - adding a pseudo-time stepping, with time representing the frequency.
The other way is to use the parametric hook function, as done in input/poisson_parametric_study.py example. Basically, you need to define a function, that after each computation modifies some parameters of the problem. As that function gets a ProblemDefinition instance, it can change really anything (even return completely other problem). In the example mentioned, there is a function called vary_omega1_size() that changes a size of a subdomain. The example is commented, so it should get you started.
The latter way is completely general, but is probably an overkill for you. Anyway, I am back, so ask at will. :-)
Ok, the parametric hook sounds interesting. I'll look into it and post back with any questions.
By the way, is it possible to reuse sfepy results as the input to a second sfepy run? I would like to run a static linear elastic analysis and then use that as a prestress condition for the frequency sweep (i.e., modified stiffness). If this isn't possible yet, I would be happy to try to develop this.
You are lucky, I have just implemented this today, see the git repository.
Two things are needed (replace <> with what you need):
a function that reads the results:
def get_data(ts, coor, region): filename_results =
io = MeshIO.any_from_filename(filename_results) all_data = io.read_data(0) return all_data[<variable_name>].data
declare a parameter variable with a setter function ('T' in this case):
variables = { 'u' : ('unknown field', '3_displacement', 0), 'v' : ('test field', '3_displacement', 'u'), 'T' : ('parameter field', 'temperature', {'setter' : 'get_data'}), }
example equations (thermoelasticity, 'T' is known from a previous computation):
equations = { 'balance_of_forces' : """dw_lin_elastic_iso.ivol.Omega( solid.lame, v, u ) + dw_biot.ivol.Omega( solid.alpha, v, T ) = 0""", }
You can try to debug it :-)
cheers, r.