FLAC2D custom contour plot?

Hi All,

A quick question: Is it possible to create a custom contour plot? And if so, how/where do I do it? I’m currently working through FISH tutorials, but I’ve yet to see an example of how it is done.

I’m trying to get a contour plot of the spalling limit, which is just s1/s3.

Cheers,
Adam

Crisis averted, figured it out. See below, with spalling_limit called after ‘model solve’.

; Spalling limit
fish define spalling_limit
    loop foreach adr zone.list
        local sxx = zone.stress.xx(adr)
        local syy = zone.stress.yy(adr)

        zone.extra(adr, 1) = sxx / syy        
    endloop
end

@AdamL, yes you can create a contour plot of any variable stored as an extra parameter for a zone or gridpoint (as you figured this out). For this, create a new Zone plot, and select the following parameters (this plot shows a contour of sxx/syy generated using your code):

I would advise adding an extra check into your function for the case when syy = 0.0. For example:

fish define spalling_limit
    loop foreach adr zone.list
        local sxx = zone.stress.xx(adr)
        local syy = zone.stress.yy(adr)
        if (syy != 0.0) then
            zone.extra(adr, 1) = sxx / syy
        else
            zone.extra(adr, 1) = 0.0
        endif
    endloop
end
1 Like