Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Failed initializing task: optimize

  1. #1
    Join Date
    Jun 2020
    Posts
    10

    Default Failed initializing task: optimize

    Hello,

    I am trying to run a constrained levmar optimization on a biphasic material with data fit to stress experimental data and I am getting the error message Failed initializing task: optimize. I think it may have to do with how I am formatting my parameter but I am not sure. I have tried to trouble shoot but cannot seem to find my error, I have included the file and the simulation file if anyone has suggestions. I have run optimizations before so I know I have the package installed correctly, and I tried to just copy the text file and change the parameters and data points but I am not sure what went wrong.

    Thanks in advance
    Ben

    Default2_op.feb
    Default2.feb

  2. #2
    Join Date
    Dec 2007
    Posts
    1,043

    Default

    Hi Ben,

    If you are getting this error that's probably because the executable you are using for FEBio was not compiled with the correct option for "constrained levmar". Please download the latest version of FEBioStudio from FEBio.org. It includes the executable for FEBio3, which should be compiled properly for this option. (If not, please let us know).

    Best,

    Gerard

  3. #3
    Join Date
    Jun 2020
    Posts
    10

    Default

    Gerard,

    Thank you for the response.
    I will try redownloading FEBio, but I just tried running a different file that is also "constrained levmar" and it worked fine, I am only getting this error with this specific file.

    Please let me know if you have any other thoughts.

    Thanks,
    Ben

  4. #4
    Join Date
    Nov 2007
    Location
    Salt Lake City, UTAH
    Posts
    2,329

    Default

    Hi Ben,

    The approach you are trying to use is deprecated. We are working on a different mechanism for accessing element (and nodal values) in the optimization module, but this was not finished in the 3.0 release of FEBio. I will look into finishing this new feature in 3.1. I will try to keep you updated, but feel free to check in in a couple of weeks, if you have not heard back from me.

    Cheers,

    Steve
    Department of Bioengineering, University of Utah
    Scientific Computing and Imaging institute, University of Utah

  5. #5
    Join Date
    Jun 2020
    Posts
    10

    Default

    Steve,

    Thanks for the response, but I am not entirely sure what you mean. Are you saying that the way I am accessing the element is what is causing the problem? And that the only solution is to wait for a fix? I just want to be sure theres nothing else that might work in the mean time.
    I am mostly just confused because I can run other optimizations, and while they are accessing nodes, not elements, the access method seems to be similar from what I can tell.

    Thanks,
    Ben

  6. #6
    Join Date
    Nov 2007
    Location
    Salt Lake City, UTAH
    Posts
    2,329

    Default

    Hi Ben,

    FEBio does not support accessing nodal and element data very well. The only options available are hardcoded. For nodes this is the "position" and the solution variables. For elements, only the stress is accessible, but only for elastic materials, not for biphasic materials. For an elastic material, this would be the syntax:

    Code:
    <param name="fem.mesh.elem[10].var('stress').zz"/>
    This approach is proving to be difficult to generalize, so instead we are looking at an alternative approach that uses the same data options as are available in the log data sections. That is the new method I was referring to in my previous post. I don't have a beta version of that yet, but hopefully I will in the next couple of weeks.

    Cheers,

    Steve
    Department of Bioengineering, University of Utah
    Scientific Computing and Imaging institute, University of Utah

  7. #7
    Join Date
    Jun 2020
    Posts
    10

    Default

    Steve,

    Thanks for the clarification. I look forward to hopefully hearing more soon.

    Ben

  8. #8
    Join Date
    Nov 2007
    Location
    Salt Lake City, UTAH
    Posts
    2,329

    Default

    Hi Ben,

    When looking further into this, I realized that this alternative mechanism I mentioned is already partly implemented. (I guess I forgot how far along this implementation was.) Although it's far from finished, I think it will work for your needs. This new approach essentially requires two steps:
    1. Define a "data" section in the Output section of your input file that says what additional data you want FEBio to calculate. In this case, this will be the stress.

    Code:
    	<data>
    		<element_data data="sx">1</element_data>
    	</data>
    The value of the data attribute can be any of the element data variables that can be used in the logdata section. (See section 3.17.1.2 in the user manual)

    2. In the optimization file, reference this data variable in your objective definition.

    Code:
    	<fnc type="parameter">
    		<param name="fem.data('sx').value[0]"/>
    	</fnc>
    The "value" parameter is an array, so it needs a (zero-based) index.

    I've attached an example input file that shows this approach. To run it, just type:

    Code:
    >febio3 -i model1.feb -s opt.feb
    Please take a look at the example, then give this approach a try in your model and let me know what you find.

    Cheers,

    Steve
    Attached Files Attached Files
    Department of Bioengineering, University of Utah
    Scientific Computing and Imaging institute, University of Utah

  9. #9
    Join Date
    Jun 2020
    Posts
    10

    Default

    Steve,

    Thank you for posting another helpful update. I added the code you provided to my optimization files and I am no longer getting the error initializing optimization in FEBio 2.9. The optimization ran for over 5000 iterations before I terminated it, but I would guess this is due to something I am missing in my model.

    On a different note, I downloaded FEBio Studio, and am trying to run the example files you provided, but have been unable to deduce how to run optimizations from the GUI, and I did not notice it in the user manual. Additionally, I have been unable to find the download for FEBio 3.0 as a standalone on the website. I apologize if these are trivial questions, but I appreciate any advice you may have.

    Thanks,
    Ben Johnston

  10. #10
    Join Date
    Nov 2007
    Location
    Salt Lake City, UTAH
    Posts
    2,329

    Default

    Hi Ben,

    The features I was referring to are supported in FEBio3. I think some of that initial development was started in FEBio2.9, but I definitely recommend using FEBio3.

    When you install FEBio Studio, it will automatically install FEBio3 for you as well. You do not need to install FEBio3 separately.

    You can run optimization problems from within FEBio Studio, but it requires overriding the command line. (When you open the Run FEBio dialog button, click the Advanced button, then check the "override command" and then enter the correct commands for running the optimization.) We will be adding some better support for optimizations in one of the next releases, but if this does not work, you should be able to use FEBio3 as a standalone program, just like you use FEbio2 (just use febio3 as the executable's name.) Please give that a try and let me know what you find.

    Cheers,

    Steve
    Department of Bioengineering, University of Utah
    Scientific Computing and Imaging institute, University of Utah

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •