How to control the ANALYSIS procedure thru modify the SRC?
Moderators: silvia, selimgunay, Moderators
How to control the ANALYSIS procedure thru modify the SRC?
Hi fmk.
When I am tring to add a discrete crack analysis framework to OPENSEES, stationary crack simulation is of good accuracy. When crack growth simulation is the problem,full control of the analysis procedure should be obtained(I think),because SOLUTION DEPENDENT Criterion(like "energy release rate" calculated from the element stress statuses about the vicinity of crack tips) is used.
What I want to do is Just Commit the domain status according to a SOLUTION DEPENDENT criterion, and Call the revertTolastcommit() when the SOLUTION DEPENDENT criterion is beyond the tolerance, then go on iteration with a smaller increment. The question is how to do this?
I also want some Constraints, nodes and elements to be added or removed during the analysis steps.
Could I get my goal thru modifying some functions of StaticAnalysis class? or StaticIntegrator class? or Just modifying codes in Element class level or Material class level?
When I am tring to add a discrete crack analysis framework to OPENSEES, stationary crack simulation is of good accuracy. When crack growth simulation is the problem,full control of the analysis procedure should be obtained(I think),because SOLUTION DEPENDENT Criterion(like "energy release rate" calculated from the element stress statuses about the vicinity of crack tips) is used.
What I want to do is Just Commit the domain status according to a SOLUTION DEPENDENT criterion, and Call the revertTolastcommit() when the SOLUTION DEPENDENT criterion is beyond the tolerance, then go on iteration with a smaller increment. The question is how to do this?
I also want some Constraints, nodes and elements to be added or removed during the analysis steps.
Could I get my goal thru modifying some functions of StaticAnalysis class? or StaticIntegrator class? or Just modifying codes in Element class level or Material class level?
Re: How to control the ANALYSIS procedure thru modify the SR
FROM the quickmain project of Opensees SRC code, I have known that the object of StaticAnalysis class(which derives from the Analysis class) Controlled the Solving procedure of an FEA model. That means one can modify the definition of StaticAnalysis class to make opensees do what you want.
go on typing my own codes..to be continued.
go on typing my own codes..to be continued.
Re: How to control the ANALYSIS procedure thru modify the SR
not sure what you are on about.
Re: How to control the ANALYSIS procedure thru modify the SR
fmk wrote:
> not sure what you are on about.
Sorry about my poor English,
I just studied what OpenSEES did when a user sourced a tcl script through the quickmain project in the SRC..
And I have known that when we typed some script, like "node 1 0 0 0", in the prompt, the corresponding object would be created in OpenSEES memory.
I found that all the objects, which were created before the creation of the object of StaticAnalysis class, were just the definition of a analysis model.
When we call the member function StaticAnalysis::analyze(numSteps), the solution procedure will start..
The problem is: I want to do something during the solution procedure, like "removing/adding a SP_constraint" "removing/adding an element or a node".
And also I don't want to modify the StaticAnalysis class and re-compile the SRC to build my own version of OpenSEES..
I just want to achieve the goal throught creating a Dynamic-link library file of element class..
I know that when an element object is being added to the "Domain", the element class member function "Setdomain(Domain *theDomain)" is first called, then function"update()"..
My idea is that modify Setdomain() that we store the Domain pointer as a "static" member. Thus when the last element is added to Domain, we create an object of StaticAnalysis class in the Setdomain(). This time, StaticAnalysis can be my own version(removing/adding components is possible according to my preferences) then run function analyze(numSteps)...
So I want to know if there is any other way to do something, like removing/adding domain components , during the the routine StaticAnalysis::analyze(numSteps) is running.
> not sure what you are on about.
Sorry about my poor English,
I just studied what OpenSEES did when a user sourced a tcl script through the quickmain project in the SRC..
And I have known that when we typed some script, like "node 1 0 0 0", in the prompt, the corresponding object would be created in OpenSEES memory.
I found that all the objects, which were created before the creation of the object of StaticAnalysis class, were just the definition of a analysis model.
When we call the member function StaticAnalysis::analyze(numSteps), the solution procedure will start..
The problem is: I want to do something during the solution procedure, like "removing/adding a SP_constraint" "removing/adding an element or a node".
And also I don't want to modify the StaticAnalysis class and re-compile the SRC to build my own version of OpenSEES..
I just want to achieve the goal throught creating a Dynamic-link library file of element class..
I know that when an element object is being added to the "Domain", the element class member function "Setdomain(Domain *theDomain)" is first called, then function"update()"..
My idea is that modify Setdomain() that we store the Domain pointer as a "static" member. Thus when the last element is added to Domain, we create an object of StaticAnalysis class in the Setdomain(). This time, StaticAnalysis can be my own version(removing/adding components is possible according to my preferences) then run function analyze(numSteps)...
So I want to know if there is any other way to do something, like removing/adding domain components , during the the routine StaticAnalysis::analyze(numSteps) is running.
Re: How to control the ANALYSIS procedure thru modify the SR
no .. just repeat what the script would do in C++ .. i.e. some analysis step2, remove whatever, more analysis steps .. it is much easier in a script than writing the c++ code though the results will be the same whichever approach you use.
Re: How to control the ANALYSIS procedure thru modify the SR
fmk wrote:
> no .. just repeat what the script would do in C++ .. i.e. some analysis
> step2, remove whatever, more analysis steps .. it is much easier in a
> script than writing the c++ code though the results will be the same
> whichever approach you use.
thanks a lot for your suggestion, I am now trying to make it work..
but it suddenly occurs to me that..is there any way to transmit the result of a c++ coding function to a variable defined in Tcl command line?
Because some..solution dependent results..are needed to judge whatever to remove from the current domain.. and it may be easier(I think..) to get those solution dependent results in c++ code through ..calling the existed member functions defined in OpenSees classes..
My idea is doing this through text document files.. Could it be more efficient?
> no .. just repeat what the script would do in C++ .. i.e. some analysis
> step2, remove whatever, more analysis steps .. it is much easier in a
> script than writing the c++ code though the results will be the same
> whichever approach you use.
thanks a lot for your suggestion, I am now trying to make it work..
but it suddenly occurs to me that..is there any way to transmit the result of a c++ coding function to a variable defined in Tcl command line?
Because some..solution dependent results..are needed to judge whatever to remove from the current domain.. and it may be easier(I think..) to get those solution dependent results in c++ code through ..calling the existed member functions defined in OpenSees classes..
My idea is doing this through text document files.. Could it be more efficient?
Re: How to control the ANALYSIS procedure thru modify the SR
it is possible to add a command to do it .. look at commands.cpp in OpenSees/SRC/tcl to see how to add commands
Re: How to control the ANALYSIS procedure thru modify the SR
Thanks very much, now trying..