Giter Site home page Giter Site logo

Comments (9)

Kevin-Mattheus-Moerman avatar Kevin-Mattheus-Moerman commented on June 11, 2024

Hi @NataCalc thanks for posting this issue.

Can you describe what you are trying to do? Perhaps I can recommend the best demo to focus on.

The demo DEMO_FEBio_active_contraction_01 is no longer available in the latest GIBBON. I would upgrade to the latest GIBBON version.

The old FEBio versions use febio_spec 2.0 that means older FEBio version code the XML file a bit differently. The latest FEBio can still run stuff writtin in febio_spec 2.0 but it is better to switch to febio_spec 2.5. All GIBBON demos called DEMO_FEBio_.... are for the old febio_spec 2.0, while the demos starting with DEMO_febio_... (note lower case febio) are for the new febio_spec 2.5. So I would focus on all the latest demos with the new febio_spec.

In terms of active contraction check out this demo: DEMO_febio_0024_active_contraction_tongue.m. There you'll find that the fibers are encoded into the febio structure like this:

%MeshData section
% -> ElementData
febio_spec.MeshData.ElementData{1}.ATTR.elem_set=febio_spec.Geometry.ElementSet{1}.ATTR.name;
febio_spec.MeshData.ElementData{1}.ATTR.var='mat_axis';

for q=1:1:size(E,1)
    febio_spec.MeshData.ElementData{1}.elem{q}.ATTR.lid=q;
    febio_spec.MeshData.ElementData{1}.elem{q}.a=a(q,:);
    febio_spec.MeshData.ElementData{1}.elem{q}.d=d(q,:);
end

Hhere a and d (as discussed in the FEBio manuals) are two vectors orthogonal to the fibre direction in this case. These vectors are created using [a,d]=vectorOrthogonalPair(V_fib).

I think the above information will fix your issues. If you ever have the timeout error again it is likely FEBio did not even start. It probably gave an error for in the input file right away. If you switch to internal mode (i.e. febioAnalysis.runMode='internal'; % or 'external';) then the FEBio messages are shown in the command prompt so you can perhaps read a relevant error message. In this case however updating to the latest GIBBON and FEBio version and focusing on DEMO_febio_0024_active_contraction_tongue.m will likely solve your problems.

I'll close this issue for now but let me know if you have more issues and I can reopen it.

from gibbon.

NataCalc avatar NataCalc commented on June 11, 2024

Thanks for reopening the issue.

I decided to start with something simple
DEMO_febio_0001_cube_uniaxial

While running Matlab which generates .feb file and execute .feb file through calling febio I receive this message and I wait for log file...

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- STARTING FEBIO JOB --- 19-Feb-2019 10:53:08
nice: febio: No such file or directory
Waiting for log file...

When I repeat described above step and in parallel run generated .feb file through terminal using febio2.osx its not only converges to results in the terminal but it helps with converges to results in Matlab terminal

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- STARTING FEBIO JOB --- 20-Feb-2019 13:59:16
nice: febio: No such file or directory
Waiting for log file...
Proceeding to check log file...20-Feb-2019 13:59:39
------- converged at time : 0.05
------- converged at time : 0.0760269
------- converged at time : 0.116848
------- converged at time : 0.169506
------- converged at time : 0.231632
------- converged at time : 0.301332
------- converged at time : 0.377093
------- converged at time : 0.457701
------- converged at time : 0.542188
------- converged at time : 0.629777
------- converged at time : 0.719849
------- converged at time : 0.811906
------- converged at time : 0.905552
------- converged at time : 1
--- Done --- 20-Feb-2019 13:59:40

I know, it sounds like a mystery, but maybe there is something logical in it!? Could it be possible febio through terminal while executing .feb file generates log file which helps MatLab to finish run?

I am using MatLab version '9.5.0.944444 (R2018b)', GIBBON version 3 and FEBio version is 2.8.5

DEMO_febio_0001_cube_uniaxial.m.zip
Febio_0001_cube_uniaxial.feb.zip

from gibbon.

NataCalc avatar NataCalc commented on June 11, 2024

Maybe this effects results which are not correct.

from gibbon.

Kevin-Mattheus-Moerman avatar Kevin-Mattheus-Moerman commented on June 11, 2024

Hi @NataCalc

If GIBBON cannot find FEBio in the path provided it tries to execute the commend febio, however running FEBio like that only works if you've set up an "environment variable"/alias.

I think your FEBio path is not properly set up in MATLAB. Did you provide the full path to the FEBio executable during installation? (you can check what the current FEBio path is by running getFEBioPath).

Although febio did not execute properly GIBBON/MATLAB will continue to wait (using internal mode and up to a user specified time), and will continue to look for the log file and track its progress. Hence when you started the FEBio job manually yourself in your own command prompt MATLAB was able to pick up the log file and display progress.

The thing to do is to make sure the FEBio path is set properly. If you are able to run FEBio from a MAC/OS command prompt by specifying its path directly then you should be all set after providing this path to GIBBON, i.e. GIBBON creates the exact same command and passes it either to an external command window ('external' mode) or runs it internally ('internal' mode).

Let me know if you need more help.

Let me know if this helps.

from gibbon.

NataCalc avatar NataCalc commented on June 11, 2024

Hi Kevin,

Thank you for help.

I reinstalled GIBBON correcting path to FEBio and now it works well.

Results from compression simulation are enclosed and there is something wrong.

uniaxial_stress_strech_curve_compression
final_step_compression
final_step_compression0

from gibbon.

NataCalc avatar NataCalc commented on June 11, 2024

I made minor changes:

(1) In NodeSets instead of using
febio_spec.Geometry.NodeSet{1}.VAL=bcSupportList_Z(:);
use
febio_spec.Geometry.NodeSet{1}.node.ATTR.id=bcSupportList_Z(:);

(2) In boundary conditions settings, constrains in x, y, z directions are applied to lower face of cube with nodes where displacement in z direction and zero displacement in x and y direction are applied to upper face of cube with nodes.

(3) Changed material properties from Ogden to Mooney-Rivlin

Now, its working well. Code is enclosed.
DEMO_febio_0001_cube_uniaxial.m.zip

from gibbon.

NataCalc avatar NataCalc commented on June 11, 2024

Same changes have been done in Cube_discret_springs and now it's working.
DEMO_febio_0009_cube_discrete_springs.m.zip

from gibbon.

NataCalc avatar NataCalc commented on June 11, 2024

Btw, all your .m examples files in GIBBON-master/docs run nicely. Above mentioned errors correspond to actual examples posted in https://www.gibboncode.org/Documentation/

from gibbon.

Hsiang-Yj avatar Hsiang-Yj commented on June 11, 2024

Would you please share the FEBio 2.5 version with me? I can't find the available software for the Gibbon, as the latest version is FEBio Studio, and the matlab running with the same warning : FAILED: Log file was not created in time. FEBio likely failed prior to logfile creation!

from gibbon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.