Taking Part In Talking CFD Podcast

Creative Fields team was very honoured to be invited to Robin Knowles’ podcast “Talking CFD”. Episode 15 was published on November 29th, and it is available on the website, via iTunes, or via Soundcloud.

Here’s a transcript of the entire interview:

Robin Knowles: Hello, hello, welcome along to another episode of Talking CFD, the podcast that is more about growing a business than growing a boundary layer.

So, picture this scene:

Someone sent you a mesh, to use in a project, it might be the one picked up from a co-worker, or from a client.

But do you:

a) run it as it is, or

b) think about it, just a little bit to make it yours

I’m firmly in the b) cup. I don’t know why, you have to change it a little, just to make it mine

However, there’s a third option – a c), and that’s what today’s guest is talking about.

I’ve never been faced with a mesh that’s made me think “You know what, I’m going to write my own mesher to sort this out.” Today I’m talking with Franjo Juretić, the co-founder of Creative Fields, the company behind cfMesh. Welcome to the show, Franjo!

Franjo Juretić: Thank you, Robin, thank you for letting me on the show.

R. K.: If you could give us a bit of background just to what Creative Fields is? How did you start?

We Creative Fields, we’re an SME, founded in 2014, by me and my partner, Mario Baburić. Basically, the whole idea started when I was developing cfMesh for a long time, in my spare time and it kind of grew, grew over time and I said “OK, let’s offer it to the world! We can start a company, we can start offering services based on meshing and preprocessing.”

And why 2014?

That year, OpenFOAM Workshop was held in Zagreb and another important conference, called The International Meshing Roundtable was held in London so I said “Well, that’s a good opportunity, these conferences are important for promoting the company, they’re close, so let’s start.

Talking CFD podcast

R. K.: So, wow, you were creating a CFD mesher in your spare time, that sounds a fair task to undertake in your spare time. Can you give us a bit of background on what cfMesh actually is, how it started to evolve in what it is now?

I started working on cfMesh at the end of my Ph.D. I worked mainly on error estimation and mesh adaptation and then I realised: “I have a huge problem, I can now run adaptive simulations, but I can’t start, I don’t have a mesher to be able to run on any kind of complex geometries”. At that time, available open-source meshers were very limited and existed only for tetrahedral meshes.

R. K. : What year we are talking about? Early 2000s?

Yes, the end of 2004, the beginning of 2005. At that time, especially for OpenFOAM, there was nothing available, except blockMesh, so then I decided “OK, now I have an implementation of triangulated surface, let’s start playing with various meshing algorithms to see how it can be built up into a meshing tool that I can use then for generating meshes for OpenFOAM.

R. K.: Was that the focus of your PhD?

The focus of my Ph.D. was mainly on error estimation and mesh adaptation, and I did a part on polyhedral meshing and all these arbitrary polyhedra. So, then I said, “OK, I’d like to extend this work to be able to work on arbitrary geometries”. Initially, when I started working, I thought that’s going to be 2-3 months of work, what the hell can be so difficult in generating a few polyhedra and making them fit the boundary (LAUGHTER ON BOTH SIDES), a piece of cake. Then I started and noticed some problems with the methodology so I said “It makes sense to work on a library, on a set of tools that people can then use later on to develop their own meshing workflows.” That was the main idea of cfMesh – not really to have a mesher as is, that can do whatever you say to do, no, it’s not that easy, all meshing tasks are specific, and you have various kinds of geometries, various kinds of algorithms can play a different role, so, therefore, it makes it easier to have something that’s flexible that you can then add and plug-in extra algorithms and develop your own meshing workflows, rather than have, let’s say, a monolithic code that “kind of” can do everything, so that was the idea behind cfMesh, and that’s how it started.

R. K.: And is that still the case now? Is that still the way that cfMesh works – it provides building blocks that you can put together to make a workflow?

Yes, I still try to do it every day. To think about what kind of algorithms we need to make cfMesh usable for some classes of problems that it’s not possible to use today.

R. K.: Does that suggest you have a particular user in mind? Is there somebody who is this for, in particular?

Yes, this is where our business model is. For example, we have people who request certain features for their specific purposes, so for them, we develop the algorithms they need to mesh their geometries as quickly as possible, with the least amount of manual work. That’s the idea behind us.

R. K.: For people who are familiar with OpenFOAM now, we obviously got snappyHexMesh as part of the OpenFOAM release, and there are various flavours of snappyHexMesh these days. This obviously pre-dates snappyHexMesh, so what’s the relation of cfMesh to OpenFOAM?

I was an OpenFOAM user, cfMesh is built on OpenFOAM, so it uses, for example, OpenFOAM classes, OpenFOAM IO infrastructure, and lots of bits and pieces from OpenFOAM. It is a library that cannot compile without OF, and it builds meshes for OpenFOAM. It’s, more or less, an OpenFOAM mesher.

R. K.: So, that’s the class of users that you are targeting? Because snappyHexMesh is not the easiest mesher to use? Would you say you are targeting the same kind of users? Or is cfMesh a bit easier to use?

When I started working on cfMesh, a few months after, I heard about efforts on snappyHexMesh, and when it was presented, I noticed it’s kind of different approach since they focus on a code, which is as is, and my idea was always to have something that is flexible, something people can then re-use, something they can develop further for their own meshing needs. That was my motive to keep on developing cfMesh and continue with this concept.

R. K.: One of the first times I came across cfMesh was when I was looking for something to do “snappyHexMesh-like-meshing”, but in 2 dimensions, which is not a great fit for snappyHexMesh. I routinely find myself recommending cfMesh to people who want to do 2D. Do you see it as an entry point into cfMesh for people? Because there are not a lot of tools out there that do that sort of, almost quad meshing in 2D.

A lot of our customers contact us because they want 2D mesher to be adapted to their needs. So for us, it is important. This was actually developed as a request of one of our important customers. They had a problem that they can represent quite well with a 2D geometry, and for them, it is really important to have something they can mesh their geometries quickly and run as many simulations as they can. So for us, a 2D mesher is one of the very important features. It actually came out as a customer request.

R. K.: Is that how development typically goes? Do you have customers who request particular workflows or you see particular use-cases from paying customers and fill it back to their open-source version?

We’ve changed our policy over time, now we put in open source the stuff that was either developed or contributed by the community or a result of the projects with our customers and they are happy to share with the rest of the world.

I like listening to what kind of problems people have, and then based on this, I align the development of cfMesh, such that we can address those issues as soon as possible. So for us, being market-driven, and listening to what people want is something that I consider to be very, very important. And we really try to address those issues as soon as possible.

R. K.: Do you think that it might be easier to do that as a small company? Do you think it’s easier to connect with your customers?

You can build a more personal relationship when you are in a small company. That’s what I really like about being in a small company you can really discuss openly with your customers, you can build a relationship with them, and based on this, solve their problems.  By listening to what kind of problems they have, and what they would like to have, and then based on our knowledge, suggest to them “OK, this is what we can do, in this period of time, or: for that, we’re going to need a lot more development and a lot more working hours”. This is something I consider to be very important and it’s not always present in big companies where you are just a part of the machine that just does a certain part of work.

R. K.: You also mentioned about getting feedback from the community, in terms of both, getting ideas and bug fixes. Is that an important aspect of cfMesh and the way the product develops? I don’t know if we explicitly mentioned it, but cfMesh is an open-source code. Because I’m not sure if I’ve ever really seen a community build around commercial code, but you do see them around open-source codes and I guess that’s what you are referring to – the community around open source project.

Yes, for example, we had certain bugs in cfMesh reported by the community. We also have a community of people using cfMesh for various kinds of problems and based on their feedback we can understand “OK, these are the problems that these people face and based on these problems, we can develop additional algorithms or improve existing algorithms to get better meshing algorithms that can in the end solve the problems such that people spend less time meshing and more time doing analysis.

R. K.: And I guess if it’s modular as you were describing earlier, you can then add in functionality and things without the necessity of adding anybody else?

Yes, for example, if someone has additional requirements, on, let’s say 2D mesher, you can simply create your own workflow, plug in a few additional algorithms, and have your own custom-made mesher. So that’s the idea of cfMesh and the main reason that is designed that way, to really enable people to customize their meshing to their needs.

R. K.: Would that extend as far as customizing it to work with other solvers or is it always going to be an OpenFOAM mesher?

Well, using it for other solvers means converting the data to the format that other solvers use. I don’t see it as being meant only for OpenFOAM- It’s really a matter of being able to generate meshes that can be usable with a certain solver. We had people using it with Fluent, for them, it made sense because they could save a lot of computational time, compared to running it on tetrahedral meshes, and also that could use much fewer resources for the same accuracy.

R. K.: What we haven’t mentioned so far– so it is an open-source code released under GPL, which is I guess inherited from OpenFOAM, is that right?

Yes, it was inherited from OpenFOAM and it was also our intention to do it that way.

But the bit we haven’t mentioned is cfMeshPRO. So, one of the conundrums faced by companies who build open-source products – is how do you make money from a product that is freely available? How does cfMeshPRO fit into your business model?

Let’s say a few words about open source and making money. For us, cfMesh is a marketing material. It also creates brand awareness. Two years ago, nobody knew about Creative Fields, we were a start-up, and only a few friends of ours knew about our work, and today a lot of people know about cfMesh. So, by letting people know something exists and if it fits their needs, if they notice “OK, now I want something more”, these are the kind of people that come to us and we do adjustments and customization of meshes for them. At that point, they can contribute to the development of cfMesh for other people and also solve their meshing problems, because then they can, instead of wasting time on preparing cases, they generate meshes in a few seconds, and run simulations most of their time. That is where the value comes in for them.

Regarding cfMeshPRO – it takes time to prepare a complex geometry, all your settings in a dictionary – it can be time-consuming and frustrating – so the idea behind cfMeshPRO is to develop an interface where you can import geometries and then also navigate through those geometries easily. For example, if I want to know what a patch is, I just click on it, and immediately get the information on what patch I’m referring to. Then, for example, if I want to define a cell size at a certain part of the mesh I can also ask this framework “Please tell me, what’s the value that I’ve used, how does it compare to the geometry there”, so I can immediately see my cell size on the screen

To me, it creates an environment where I can set up a meshing job in much less time than through the console. It has enhanced algorithms that are more robust on really complex geometries. That’s our commercial offering to the people with standard requirements, who don’t have specific requirements for customization of cfMesh.

R. K.: I guess the next level, beyond that, would be customization?

Yes, that’s right.

R. K.: So there is still a relevant revenue from consultancy services?

Yes, there is.

R. K.: As a small company, how do you view your competition in the marketplace? Who do you think your competitors are? Or do you not pay any attention at all?

We always monitor competition – I mean, who doesn’t? But we do not really focus on who our competitors are. We mainly focus on what we can do better to satisfy the needs of people who contact us and who work with us. Primarily, we try to be more competitive by listening to the community and trying to develop the features that they need as soon as possible.

We have a budget as we have, we are a small company, and we can’t do everything that other competitors do, but we do the best we can to satisfy the people that want to use cfMesh and that want to work with us. This has been a successful business model for us so far.

R. K.: When you mentioned people being able to contribute back into the code – Is that an easy process or is it something you find difficult to manage?

The way it works – if somebody wants to share a piece of code they developed based on cfMesh, they can contact us and we can set up them access to our repository.

And the rules are: We work by using GitFlow, it’s an environment where everybody develops new features in a separate branch. So, if somebody contributes, at first their work is in a separate branch, and then they can contact me again and say “Now I think my feature is ready to be included in cfMesh”. Then it goes through a set of reviews, and if it passes the review, then we merge it into the main development branch and then it is available with the next release.

The idea is “contact us, say “I have something I want to contribute”, then we can go through the process of reviewing, any bits and pieces that we think are not suitable to be released with the cfMesh in the current form, and merge it together with the rest of the code.

R. K.: Sounds as if you almost actively encourage it?

We try to be open as much as possible.

R. K.: You also have an offering called cfFLOW. What is cfFLOW, what is a motivation behind that?

OpenFOAM is a library. Based on this library, you develop vertical applications which we call solvers.

Developing a GUI for OpenFOAM is an extremely difficult task. So the idea behind the cfFLOW is to have a data model which you can then use to code OpenFOAM solvers and then based on this data model also how to show this data model on the screen.

R. K.: Is there a way to deploy those apps out? Amongst users or is it for something to develop in your own company? 

For example, you have big companies today who want to use open-source tools and OpenFOAM is an interesting option for them. But the problem is, if they have a set of solvers that are difficult to use, to disseminate the knowledge to their employees, because these are the engineers who have a specific problem to solve and they need a simple tool to set up the simulations and get the answers they need for their designs.

The idea about cfFLOW is that we, together with the simulation experts in those companies, develop a vertical application, where the engineers can enter the necessary parameters that are important to be able to generate the simulations and extract results. It is really kind of a framework for GUI development based on OpenFOAM.

R. K.: I really like that idea, because from my experience (although I may be wrong) companies doing CFD these days, are doing a lot of the same thing, a lot of very similar rounds. They don’t need exposure to all the set of functionalities OpenFOAM can give them. Is that the sort of thing you can build with cfFLOW?

Yes. For example, it’s about talking to the people and understanding which are the necessary parameters we want to be able to control in the simulation. For example, “I want to be able to control the geometry, change the velocity inlet, “ based on given parameters, you can then come up with a set of defaults and a list of a layout of how to present it on the screen to the people.

cfFLOW is an environment where you can set defaults and you can code what you want to show to the person. It is a GUI application for people with little knowledge about simulations. And to code all the knowledge “under the hood”.

R. K.: Internal IP into your own application. That’s a relatively new offering from you, isn’t it?

It is something we actively work on – we have not marketed it extensively so far, because we are still validating this approach and we see an interest in it from companies.

R. K.: So is it a commercial product, then?

Yes, it is a commercial product.  And we also offer a standard version of cfFLOW where people can just have a look at how it is to implement a solver and click a few buttons, but we mainly work on developing custom apps for our customers, based on cfFLOW.

R. K.: Most likely scenario then is if somebody needs it, they would come to you and then you use cfFLOW to develop it.

Yes, it is.

R. K.: Is meshing always going to be the main focus of the company?

Hmmm. As I’ve already said, when I started working on cfMesh I thought “OK, 2-3 months, I’ll have everything working fine…”

R. K.: So was that 13 years ago? (SMILE)

Yes, it’s been 13 years ago and I still see a lot of challenges in really making meshing robust, and simple to use. It’s going to be an important part of our development and business in the future, for sure. We also see a lot of potential in custom development of applications. We also expect a lot of this cfFLOW offering.

What I also wanted to say regarding the meshing – it is difficult because there are so many bits and pieces that can actually come into play, so for example, you need a certain quality of the geometry, then there are holes, overlaps, gaps, cracks and it’s quite difficult to meet those problems in an environment that is both, easy to use, robust and generates high-quality meshes. So it’s really a challenging job and that keeps me personally very excited.

R. K.: It sounds like that. It must be quite a good area to be working with. You probably never going to solve everything, because everything is moving along and we CFD engineers are greedy guys – when we get more computing power, we want more cells, we want more meshes and we want them faster – the goalposts are always shifting.

I still remember my colleague working on an engine and he spent a month and a half working on his mesh, and these days you can generate such a mesh in an hour or two, but people still have a lot of problems with meshing. Just as you mentioned, the problems become more and more difficult and the bar raises all the time.

It’s the same with everything, any field – When you reach a certain status, you want to go higher, and that’s also the case with meshing.

For me, it was very important and challenging studying these merging parallel architectures, so being able to use all the cores in my computers. All these issues, when you think of them, there’s so much work, but also so many nice challenges for the future. And when they get resolved, I’m sure the new challenges will come out.

Probably even in 10 years’ time, we’ll still be talking in a way “Oh, if I had this feature, or that feature, that would be better…” If there weren’t any problems, we engineers wouldn’t be needed in this world.

R. K.: If somebody is listening to this, thinking they would like to help you out on the journey to making it better, how would they get involved, with having hold of the code, looking at it, seeing if they can contribute, if they work on their Ph.D. and have something innovative, meshing-wise they think it would be a good fit for you? How does somebody get involved?

We have a cfMesh repository at Sourceforge – which is a good place to go and look for cfMesh.

We also have our Facebook and Twitter account so please subscribe and follow us for what we do. We also have our info emails, so if you want to get in touch with us or contribute to the code, you can contact us and we’ll try to assist you as much as we can to do a good job and come up with something that is useful for both, for you and the community.

That sounds excellent! Thank you for coming and sharing your experience and vision for where you want to take meshing.  

Choose your best solution

cfMesh (open source)

cfMesh is an open-source library for mesh generation implemented on top of the OpenFOAM® framework. Read more here.

Note: None of the OpenFOAM® related offering by Creative Fields Holding Ltd is approved or endorsed by OpenCFD, Ltd. (ESI Group), producer of the OpenFOAM® software. OpenFOAM® and OpenCFD® are registered trade marks of ESI Group.

Basic automatic cell sizing

Boundary layers

Cartesian 2D + 3D

Open source

Polyhedral meshing

Tetrahedral meshing

CF-MESH+ (pro)

Discover superior boundary layer generation capabilities, all in an affordable, automated, easy-to-use software.

Basic automatic cell sizing

Cartesian 2D + 3D

Commercial

Polyhedral meshing

Tetrahedral meshing

Advanced control of layer topology

Advanced control of mesh quality

Advanced control for automatic cell sizing

Advanced selection of domains that shall be meshed

CAD import

Hexahedral meshing

Robust algorithms for mesh quality control

Support included (except the hourly licenses)